Closed ParsaGachkar closed 2 weeks ago
Thanks for contacting us.
Because you're interested in overriding the InputBase<T>
you can already decide what to actually render in the overridden BuildRenderTree
method, where you can choose to render some other property, your custom implementation provides instead of CssClass. Will that not cover your needs here?
Thanks for contacting us. Because you're interested in overriding the
InputBase<T>
you can already decide what to actually render in the overriddenBuildRenderTree
method, where you can choose to render some other property, your custom implementation provides instead of CssClass. Will that not cover your needs here?
The problem is that I'll end up with a duplicate code while setting up the wiring of my input, which is already available at InputText. For instance, I just want to prepend a specific css class for my text input! A simple override from text input and overriding its css property would really simplify the task.
@ParsaGachkar
You can add any CSS class to an InputBase<T>
descendant without overriding the code.
Add the class
attribute like
<InputText class="my-class" @bind-Value=value />
Now my-class
will be added to the value of CssClass and set on the HTML
Thanks for contacting us. While this may be a great idea, it is not aligned with our long-term vision to make it part of the framework. For many other ideas which don't belong to the framework we encourage the community to build and ship on their own, contributing to the expanding .NET Ecosystem.
You can learn more about our triage process and how we handle issues by reading our Triage Process writeup.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I want to be able to override the
CssClass
field in my custom Input that inherits fromInputBase<T>
and set a custom value to it!Describe the solution you'd like
please make
CssClass
property ofInputBase<T>
virtualAdditional context
No response