-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
[core] Initial DataGrid component #3558
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Didn't really comment anything major, just some grammar when i went through it and some other small things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of feedback, can we pin the panel for adding item, I scrolled and suddenly forgot that I had the panel open and wondered why the button is disabled. If we don't pin it, maybe we can make the button always enabled and scroll to the panel if clicked twice (I would go with the pin options from these two).
One more thing, maybe we can add some separator between the fields in the panel and maybe add a disabled state if the user cannot enter some field (e.g. the id is auto-generated).
When using both update and delete, it would be great if the update icons don't cover the remove icon.
The rest looks great 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also noticed that the API links are broken, they point to toolpad-core/api/component instead of toolpad/core/api/component. It works as expected on master.
At the moment, the add row logic is built on top of an empty row in editing mode, would like to pin this row but that's a X pro feature. Potential solutions I can think of:
For me, personally, 2. makes a lot of sense. For tables with lots of columns, vertical scroll in a form feels more natural than horizontal scrolling in an editable row.
Yep, it being built as a row makes customizing this a bit awkward
The idea would be to keep the delete action available even when the row is in update mode? Basically, show 3 icons? |
Right makes sense, I was too focused on this particular use-case.
I would vote for this yes. Not a hard push tough, but it seemed a bit awkward that the icon was not there. |
Ok, I'll try it out with a form in follow-up. In the meantime I've disabled scrolling when the create flow is activated. Regarding the row actions, I was trying to avoid having to make the column wider than two icons. But we can make that three. Another option is to to have in editing mode a save icon, and a menu that contains a cancel action and a delete action. If we can enable cell editing mode again, we can even reduce it to a delete icon only. |
Sounds good, feel free to tackle in a follow up. We can maybe ask someone from the design team for an opinion. |
This was fixed on master in the meantime, merged these changes in this branch |
Ah Jan already answered! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Bring in DataProvider and DataGrid from the prototype.
Supports all CRUD operations, and serverside/clientside pagination
docs preview