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.31k stars 534 forks source link

[Feature] CardGrid #1573

Open Luk164 opened 3 years ago

Luk164 commented 3 years ago

Is your feature request related to a problem? Please describe. Datagrid allows us to make pretty tables with filtering, sorting etc. What I would like to do is instead of rows, use separate cards for each entry in a grid-like fashion, like most EShops do.

Describe the solution you'd like A new component, simmilar to dataGrid, but instead of rows it creates a grid of cards. These cards are templated in advance by the user, and filled for each item in provided data source. Templates also contain code for filtering and sorting. I fully expect this component to need more work on the programmers side than dataGrid, but that is simply a tax on flexibility.

Additional context

I believe some ideas could be borrowed from dataGrid, though considering CardGrid is supposed to be more malleable, there will probably not be as much stuff. The good idea to borrow would be EditTemplate for example.

stsrki commented 3 years ago

I can consider adding, but for now, it's not a priority.

Luk164 commented 3 years ago

@stsrki I can give it a go if you don't mind, but I am afraid my style is a bit different from yours. Would that be a problem?

stsrki commented 3 years ago

Well, I would like to follow style and project structure guidelines as much as possible according to other components.

StephenOTT commented 3 years ago

Following up on this as I keep coming back to this feature: Context:

Is your feature request related to a problem? Please describe. I created a DataGrid (because i wanted the pager functionality, OnRead functionality, Detail Row Functions, etc, etc). I created a custom display for the grid column where each row was a Card.

But the header row (was blank as there was no caption for the row, BUT there was still an ability to click on the header which causes the sorting to occur).

But I feel this goes into a larger functionality need: The DataGrid's capabilities but not specific to a Table.

Other similar discussions are already occurring: https://github.com/Megabit/Blazorise/discussions/2458


Generally It seems that the underlying missing component is something like "Pageable Content". Something that combines Pagination logic with a Data, ReadData, ShowPager, TotalItems, Page Size, SelectedRow/SelectedItem, etc, similar to DataGrid. After that 99% of display logic could be handled through code examples (such as the #2458 example).