Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.32k stars 535 forks source link

DataGrid: Column Filter | Add Between filter mode #5813

Closed David-Moreira closed 3 weeks ago

David-Moreira commented 1 month ago

@stsrki can you take a look at the POC?

Initially I was trying to just use SearchValues as an object that could either be an array or a regular object, but it was getting too complicated with casting and guessing, and trying to be overly dynamic. So I changed to just set the two values explicitly we need for the range, with SetSearchValue1 and SetSearchValue2 and corresponding getters.

  1. What are your thoughts on this approach?
  2. Do you think regular DataGridFilter should support Between also? So below every column, there would be two text fields instead of one?
David-Moreira commented 1 month ago

@stsrki Please take a look at this version. I personally dislike the obscurity of it. But it might be "easier" for our api internally I guess. Let me know your thoughts.

David-Moreira commented 3 weeks ago

The code seems good to me.

But I have problems with selecting dates. If I click on a date it doesn't get applied to the filter. Just stays empty-

image

Seems like a regression perhaps? Or we didn't notice it when we implemented the DatePicker in the filter? It should be fixed in a separate issue as it's not caused by this PR.

stsrki commented 3 weeks ago

Just update release notes and add if needed add a new example in the docs.

I will open new ticket for the date bug.

David-Moreira commented 3 weeks ago

LGTM. Do you plan to add anything else or is it ready for merging?

Nope.