-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
Pillar: Dev ExperiencePriority:3Work that is nice to haveWork that is nice to haveaffected-fewThis issue impacts only small number of customersThis issue impacts only small number of customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-component-modelAny feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)Any feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)feature-renderingFeatures dealing with how blazor renders componentsFeatures dealing with how blazor renders componentsseverity-minorThis label is used by an internal toolThis label is used by an internal tool
Milestone
Description
With regards to this PR: #23221
Instead of assuming an empty string and null are the same for an input,...
Would it be possible to set a marker attribute on the when we try to set the value to @null, and in the Blazor code detect that and use null for the @onchange event and binding?
<option value=@null>Select one... </option>
Would generate something like
<option bl_somethingunique>Select one... </>
Due to HTML limitations we wouldn't be able to have an empty string and a null as available values in the same select, but at least the C# developer won't have to write some code to convert "" to null, and it will "just work".
benjaminsampica, gojanpaolo, NetherGranite, MichelJansson, pavlexander and 8 moreStevenTCramer, brettwinters, Dreamescaper, pavlexander, kevingates and 1 more
Metadata
Metadata
Assignees
Labels
Pillar: Dev ExperiencePriority:3Work that is nice to haveWork that is nice to haveaffected-fewThis issue impacts only small number of customersThis issue impacts only small number of customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-component-modelAny feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)Any feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)feature-renderingFeatures dealing with how blazor renders componentsFeatures dealing with how blazor renders componentsseverity-minorThis label is used by an internal toolThis label is used by an internal tool