-
-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MatSelectItem does not update selected value #860
Comments
@vankampenp In your example you hard code value3. Here is updated code so it works. Here is the offending code:
Replace this in your code body with a different method of setting the initial value
|
@enkodellc Sorry, but I do not think your solution is working, at least not for me. The text in dropdown popup is being updated but the text in select itself (the one with CSS class "mdc-select__selected-text") - not. |
@w26ak we ported to MudBlazor not long after I posted this. If I posted it it worked for me but that was a LONG time ago now. A lot has have changed with Blazor |
Thanks @enkodellc. I ended up with a temporary solution which I suggested in #939. Hope you guys will fix it soon. |
Describe the bug
When an item is selected in MatSelectItem, it is shown in the mdc-select__selected-text span. When clicking the selected item or the dropdown icon, the dropdown list with all items is displayed.
I have an input field that allows me to change the name of the selected item. This state is changed in a separate span, and in the dropdownlist, but not the in the mdc-select__selected-text span.
To Reproduce
see fiddle
In the fiddle this works properly.
But using .NET 5.0 (latest version) and MatBlazor v2.8.0 it does not update the changed selected value. See the screenshot.
After changing the name to "vegateblesss" it is reflected everywhere, but not in the selected text span. When I click on the dropdown, the new name is shown there.
Blazorfiddle link
https://blazorfiddle.com/s/1ku2nt01
Expected behavior
The fiddle shows the expected behavior.
Screenshots
The text was updated successfully, but these errors were encountered: