TLDR: Lack of controlled mode limits the possible use-cases. It's not for everyone.
Hello. I'm sharing my frustrating experience with this library (material-table) you are recommending. I spent almost a whole week trying to get the desired _(advanced)_ behavior out of this component.
The component manages the table's state for you, but offers no controlled mode. That means you can't do things such as specify selected/expanded rows.
Trying to find an answer on how to specify selected rows, I dived into its github issues and found many others struggling... Eventually I found the hack. Turns out the table extends every row of your data with a "tableData" property, which is an object that basically holds each row's state, such as if it is checked or not. So I updated my selector and added tableData.checked = true where needed, and passed that as data to the table. It worked, so I moved on.
Then came the show-stopper: the detail panels will collapse each time the table receives new data, and this time, there's no hack like for persisting selections. This means you can't even fetch some details related to the row, because as soon as you update your state with the fetch results, the table resets its whole state, collapsing the detail panel you were just trying to show. I can think of a possible solution, but it requires changing the shape of my Redux State tree so that normalized entities are kept separate instead of being in a single "entities" object (I use normalizr). This is when I knew I needed to look somewhere else.
By no means I'm holding the MUI team responsible for their recommendations of additional libraries. Material-Table does seem promising at simple view and may be a great fit for some use cases, but its lack of controlled behavior brings heavy limitations.
Edit: I would highly recommend react-table as the best solution out there right now. It's an awesome hooks-based / UI agnostic library. Please go check it out, along with his other related projects, react-query & react-form.
@androsj We are about to start a data table effort in the core: https://twitter.com/olivtassinari/status/1192020839140605952. Your use case is information we can leverage, so thank you for sharing your experience on the data table problem.
I can understand your frustration, especially after investing time into a solution that didn't offer you a positive return. I have been here too in the past, investing days into the usage of a third-party library, to eventually arrive at the conclusion that it would have been faster and better (better output) to solve the problem myself. But understand that @mbrn is developing this project under his spare time and make it available for free. He's doing his best with the resource available. Your feedback is also information he can leverage to improve his library.
I would propose that we keep the current status-quo. Once the core data table effort is mature enough, we will stop linking alternative solutions, as we will soon be able to do with the Autocomplete component (we have already removed half).
On a different note, I have proposed mui-datatables and material-table maintainers to collaborate on this DataTable component. We will have something ๐๐ โจ.
Hi @oliviertassinari and @androsj ,
I really surprised with this issue. I just want to say that i am not a developer who's unable to accept negative feedback about his work.. You can check all issues on material-table and you can see that i desired to be more helpful to other users. I don't mean material-table is a perfect solution for most cases. Also i am developing it always. For last 2 months i am very busy and i can't work on it enough.
In addition. English is not my main language and sometimes i can't understand cases or i can't express my self sufficiently. So i might understand the case wrong and just asked about the problem with a question mark.
I hope that this discussion will help us to improve our open source projects.
Just want add that I don't find https://github.com/mbrn/material-table/issues/455#issuecomment-482187962 is an arrogant response or is flat out rejecting your feedback. This seems like a Lost in Translation issue.
Even if that response would be arrogant it's a single instance and doesn't warrant this step. Still if you feel that endorsed projects violate our Code of Conduct please open issues or contact other maintainers.
On a different note, I have proposed _mui-datatables_ and _material-table_ maintainers to collaborate on this DataTable component. We will have something ๐๐ โจ.
So long as they allow data as objects from the beginning, this would be great. I've had to shift away from mui-datatables as they no longer allow objects to be passed as cell data, severely increasing the barrier of entry to complex tables with actions and side effects.
Also those tables are quite large, 30kb and 86kb respectively, but that is besides the point.
@mbrn Forgive me for jumping to conclusions and for making this personal, inappropriate, and even insensible. I truly apologize for getting out of hand and letting my emotions take over. It's been a tough day at work.
Please allow me to remove any offensive comments from the initial post, as an honest gesture of regret.
I realize you might not get the best impression of me from this, but I'm a good guy with his own flaws, and I like to give back. So with all that said, thank you for your contributions to open source. I wish you all continued success, and count on me to help however I can.
While I'm at it, check out this interesting headless hooks-based solution.
Peace
@mbrn Forgive me for jumping to conclusions and for making this personal, inappropriate, and even insensible. I truly apologize for getting out of hand and letting my emotions take over. It's been a tough day at work.
Please allow me to remove any offensive comments from the initial post, as an honest gesture of regret.
I realize you might not get the best impression of me from this, but I'm a good guy with his own flaws, and I like to give back. So with all that said, thank you for your contributions to open source. I wish you all continued success, and count on me to help however I can.
While I'm at it, check out this interesting headless hooks-based solution.
Peace
No problem @androsj :). I think that everything is clear now :)
On a different note, I have proposed _mui-datatables_ and _material-table_ maintainers to collaborate on this DataTable component. We will have something ๐๐ โจ.
So long as they allow data as objects from the beginning, this would be great. I've had to shift away from mui-datatables as they no longer allow objects to be passed as cell data, severely increasing the barrier of entry to complex tables with actions and side effects.
Also those tables are quite large, 30kb and 86kb respectively, but that is besides the point.
I know this is old, but I've taken over as maintainer of mui-datatables and I am removing that restriction (which is now just a deprecation notice). I think the previous maintainer (who took over after greg) didn't understand a particular bug that was occurring (which will be fixed in the next release).
Anyway, it's good to see an official datatable coming out. I have a rather large app built around mui-datatables, but I'd definitely perfer an official component when one comes out.
@patorjk Thank you for continuing the maintenance of mui-datatables. @dtassone is leading the official data grid component, in case you have any questions on the effort :).
@oliviertassinari @dtassone I found this: https://finui.io/#/grid
Looks good so far, a little more grid like than what I expected, but I guess it makes sense given the name. I saw a github comment where you mentioned you were 3 months into development, I'm assuming release won't be until late this year?
One thing I think Greg did right with mui-datatables was bake in responsive design early on. Not sure if that's planned, but for certain apps it's very nice to have.
I found this: https://finui.io/#/grid
I believe this version is one or two months old. We plan to make an early preview before September. Thanks for the feedback on mobile and responsive support.
Most helpful comment
@mbrn Forgive me for jumping to conclusions and for making this personal, inappropriate, and even insensible. I truly apologize for getting out of hand and letting my emotions take over. It's been a tough day at work.
Please allow me to remove any offensive comments from the initial post, as an honest gesture of regret.
I realize you might not get the best impression of me from this, but I'm a good guy with his own flaws, and I like to give back. So with all that said, thank you for your contributions to open source. I wish you all continued success, and count on me to help however I can.
While I'm at it, check out this interesting headless hooks-based solution.
Peace