Closed SKSniperSK closed 1 year ago
It allready possible. You can set the property "AvailableItemsLoadFunc" in meta config or inherit the MudExSelect. Please have a look at this discussion https://github.com/fgilde/MudBlazor.Extensions/discussions/60 or create a new discussion
Also you can use for simple string the RenderWithAutoComplete method on your meta like this
meta.Property(m => m.SimpleString).RenderWithMudAutocomplete(new[] { "Item 1", "Item 2", "Another Item" });
I've created a sample for you here https://mudex.azurewebsites.net/object-edit-selection
Thanks a lot for the quick response! The link in your latest response with the sample throws an error (Unhandled exception rendering component: Cannot provide a value for property 'ScrollManager' on type 'MudBlazor.MudAutocomplete`1) Is there any kind of documentation I missed for all these things (besides the documentation tab on the examples page)? Because I was net even really aware that "RenderWithMudAutocomplete" exists...
try again now. There is a problem with mudAutoComplete. not my bug i guess but you can easially archive your list selection with MudExSelect
Feature request type
Enhance component
Component name
MudExObjectEditForm
Is your feature request related to a problem?
In my model I have a string value that I want to be populated based on a dropdown select input (where the entries are generated based on context, so I cannot use static strings/enums). I tried to get it working a bit 'hacky' with the "RenderAs" function by passing in the MudSelect component (along with the properties including a RenderFragment of the MudSelectItems as ChildElement etc.) but did not manage to get it working properly.
Describe the solution you'd like
I would like some way to use a dropdown as input component to set a value in the passed model.
Have you seen this feature anywhere else?
No
Describe alternatives you've considered
The only alternative I see is to not use MudExObjectEditForm and build the whole form manually.
Pull Request
No response
Code of Conduct