File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 aria-hidden =" true"
2525 role =" img"
2626 id =" @($" radio-svg-{_elementId} " )" >
27- <path d =" M0 0h24v24H0z" fill =" none" ></path >
28- <path d =" @(IsChecked ? Checked : UnChecked)" ></path >
27+ @( new MarkupString (IsChecked ? Icons .Material .Filled .RadioButtonChecked : Icons .Material .Filled .RadioButtonUnchecked ))
2928 </svg >
3029 </span >
3130
4140 const radio = document .getElementById (' static-radio-@_elementId' );
4241 const svg = document .getElementById (' radio-svg-@_elementId' );
4342
43+ const checkedIcon = ' @(Icons.Material.Filled.RadioButtonChecked)' ;
44+ const uncheckedIcon = ' @(Icons.Material.Filled.RadioButtonUnchecked)' ;
45+
4446 if (radio && svg) {
4547 const handleChange = () => {
46- const path = svg .querySelector (' path:last-child' );
47-
48- if (path) {
49- path .setAttribute (' d' , radio .checked ? ' @Checked' : ' @UnChecked' );
50- }
48+ svg .innerHTML = radio .checked ? checkedIcon : uncheckedIcon;
5149 };
5250
5351 radio .addEventListener (' change' , handleChange);
7977 throw new InvalidOperationException ($" {nameof (MudStaticRadio < T > )} must be used inside a {nameof (MudStaticRadioGroup < T > )}" );
8078 }
8179
80+ var test = Icons .Material .Filled .RadioButtonChecked ;
81+
8282 base .OnInitialized ();
8383 }
8484
You can’t perform that action at this time.
0 commit comments