Closed McFSR closed 6 months ago
@McFSR Does the _allRules
list contain an empty value so it can bind to?
If I remember correctly the select component will show the first item if it can't find something to bind to.
@David-Moreira
No _allRules
does not have an empty entry. I could do that in this case, but what if I bind an enum to the column?
Feels strange I have to provide an empty entry to allow a "not filtered" state.
@McFSR The DataGridSelectColumn is based on our Select component which utilizes html semantics and rules.
That's how it works by default the provided <option>
is what you get.
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select
However, I was just checking,
We have an option for a default value in Select (which will generate an extra <option>
to accomodate that value)
Can you try using the DefaultItemText
and the DefaultItemHidden
and see if these fit your needs?
OK, I was able to make it work as desired by simpy adding
DefaultItemText=""
Thanks!
Blazorise Version
1.5.2
What Blazorise provider are you running on?
Bootstrap5
Link to minimal reproduction or a simple code snippet
Steps to reproduce
I use the datagrid in the sample above. Data for the select-column ("_allRules") is a list of strings.
What is expected?
What is actually happening?
What browsers do you see the problem on?
Chrome
Any additional comments?
No response