-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Support for 'multiple' attribute in '<select>' elements. #33950
Conversation
Still need to add support for bindings.
src/Components/test/testassets/BasicTestApp/FormsTest/TypicalValidationComponent.razor
Show resolved
Hide resolved
src/Components/test/testassets/BasicTestApp/SelectVariantsComponent.razor
Outdated
Show resolved
Hide resolved
src/Components/test/testassets/BasicTestApp/SelectVariantsComponent.razor
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking excellent, and very close to being done now I think :)
src/Components/test/testassets/BasicTestApp/FormsTest/TypicalValidationComponent.razor
Show resolved
Hide resolved
src/Components/test/testassets/BasicTestApp/SelectVariantsComponent.razor
Outdated
Show resolved
Hide resolved
@MackinnonBuck Again, this looks super and very close to being done :) I found one more thing that probably definitely needs attention, and a "maybe" thing. Hopefully that's the last of it! |
src/Components/test/testassets/BasicTestApp/FormsTest/TypicalValidationComponent.razor
Show resolved
Hide resolved
This looks great! It would be amazing to get support for having a <InputSelect @bind-Value="AThing">
</InputSelect>
<InputSelect @bind-Value="MultipleThings">
</InputSelect>
@code {
Thing AThing;
Thing[] MultipleThings;
enum Thing
{
[DisplayName("This is the 1st thing")]
FirstThing;
[DisplayName("This is the 2nd thing")]
SecondThing;
}
} If there's already an issue for this I couldn't find it! Happy to log one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks so much for handling all the feedback. This looks like a really super and solid feature. Great to see you were able to eliminate the MultipleValues
property too - this is a very clean API now!
Support for
multiple
attribute in<select>
elements.The
onchange
event will now provide an array of the selected elements viaChangeEventArgs
when themultiple
attribute is specified, and array values can be bound to thevalue
attribute.PR Description
BindConverter.cs
.<select>
elements with typeselect-multiple
inBrowserRenderer.ts
.InputSelect
component to infer themultiple
attribute based onTValue
.Addresses #5519