microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.52k stars 2.73k forks source link

Table sorting #22985

Closed jbk75 closed 2 years ago

jbk75 commented 2 years ago

Library

React Northstar / v0 (@fluentui/react-northstar)

Describe the feature that you would like added

Regarding the Table component in fluent UI northstart. I want to be able to sort it Is that somehow possible ?

Have you discussed this feature with our team

yes

Additional context

No response

Validations

gouttierre commented 2 years ago

Thank you for filing this item with us. I’ll mark this as a feature request and add it to our backlog, but we’re likely not going to get to it for a while @jurokapsiar - Would you and your team be able to review this request. Thank you.

jbk75 commented 2 years ago

@gouttierre @jurokapsiar Can you inform me when this could be available?

I'm also wondering what component you could recommend instead. That has similar functionality as >https://datatables.net/ I'm using React. I've tried some other components but I usually end up with getting conflict errors like conflicts with material UI or that the component is using another version of react than I'm using.

Best regards Johann

layershifter commented 2 years ago

@jbk75 @fluentui/react-northstar provides styled primitives and we expect that features like sorting will be done on consumer side. We don't plan to implement this feature for Northstar.

For example, you can check one of our prototypes: https://fluentsite.z22.web.core.windows.net/0.63.0/prototype-table. In general, I would recommend to use something like react-table with N* as it provides sorting and a lot of other features.

I quickly forked one of react-table examples just to show how it could work: https://codesandbox.io/s/hardcore-worker-q4ene6?file=/src/main.tsx


FYI: Fluent UI v9 will also have Table/Datagrid component and sorting will be built-in there, https://github.com/microsoft/fluentui/issues/23983.