-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we support sorting and filtering in this library? #8
Comments
As someone currently looking for a sortable, filterable table solution this would be great for what we need. It might be enough to document an established pattern for passing in sort functions into Table column header cells, and a way to designate columns as keys to use in a filter function that is also passed into the component. |
Hi @bzeffren-rms Cheers. |
Hi @bzeffren-rms Cheers. |
Awesome work @pupudu !!! But sorting (with the caveat being it might affect performance) is much needed. Thanks for the addition of Filtering example and code. I followed your steps for sorting. It is not working as stated. Better provide as a sample code for sorting, no need to integrate 'sorting' to the core function of this library. That is only functionality that stops me using this in my team, and promote this. |
@prabhakhar Please let me know if you find any issues with this. One thing to note (also mentioned as comments): |
@pupudu that was quick! Thank you for the online example. It looks great. I tried the same. But in my application (Semantic UI based react-app) there is an other table element, rendered by the library, that consumes the click and so no 'sort' happening. Pardon my UI knowledge here. I am seeing the 'other' table in the online example also. please note the table with a collapsed first row in the screenshot. I will dig further why the focus in your example, is the header, though the example also has the 'other' dummy table in the background. If you know the problem/solution out of your head, please let me know. |
The other table you see here is there for a different purpose. That's unlikely the cause of your problem. Would it be able for you to create an online version of your table. Then I can debug and add anything missing to the library. |
https://codesandbox.io/embed/semantic-ui-example-i6bnp is the one with my data and style. Please click near the "Zone" header to see actually the underlying table row gets the click. I have console.log print for all Cells. |
Seems you are busy. But if you need more details lemme know. |
Hi @prabhakhar I had a look the other day. It seems there is a compatibility issue with sematic UI. Should be an easy fix. But I need to find the exact cause. I can probably have a deeper look by EOD tomorrow. Sorry for taking longer to find the issue. |
Thank you for the reply. Really appreciate it. |
Any luck? @pupudu. |
Hi @prabhakhar Apologies for taking too long. https://codesandbox.io/embed/semantic-ui-example-lmf4i (The fix is in v0.9.0) |
Awesome. Works like a charm. Thank you. |
There are many ways to do those two. So we can either be agnostic or opinionated about them. This is to discuss the pros and cons
The text was updated successfully, but these errors were encountered: