Skip to content
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

[DataGrid] Implement Cell editing #296

Closed
0xMarkian opened this issue Aug 25, 2016 · 20 comments
Closed

[DataGrid] Implement Cell editing #296

0xMarkian opened this issue Aug 25, 2016 · 20 comments
Labels
component: data grid This is the name of the generic UI component, not the React module!

Comments

@0xMarkian
Copy link

As far as I understood material-ui follows Material Design spec

Material-UI is a set of React components that implement Google's Material Design specification.

But as for me it lacks in following the specification in some components, especially in Table component.
https://material.google.com/components/data-tables.html#data-tables-interaction (Edit section). The specification clearly says about the edit possibility with the help of small or large edit dialogs. But using material-ui Table component it's impossible to organize something like this because cell clicks always trigger row selection.

So my proposition here is to divide concepts following Google's Material Design and make:

  1. Row selection
    • on desktop: only with checkbox(additionally we can add the possibility to select row with ctrl button)
    • on mobile: with checkbox or with long press action.
  2. Cell edit: click on cell.

So what do you guys think about this?

@0xMarkian 0xMarkian changed the title [Table][Feature Request] Editable cells with dialogs [Table][Feature Proposition] Editable cells with dialogs Aug 25, 2016
@sabbaticaldev
Copy link

I'm looking for this too. Any solution?

@0xMarkian
Copy link
Author

@alitaheri @hai-cea @mbrookes @newoga @oliviertassinari
I have a solution and can create a PR for this. The question is what do you guys think about this?
As for me this is a critic feature adding that has to made ASAP to give people the possibility to have editable cells.

@oliviertassinari
Copy link
Member

@markwain The Table has been migrated to the new styling approach on the next branch. Would be great if you can have a look to see what is missing from a material specification point of view.

The editable cells is definitely a great feature to have 👍

@oliviertassinari oliviertassinari changed the title [Table][Feature Proposition] Editable cells with dialogs [Table] Editable cells with dialogs Sep 19, 2016
@0xMarkian
Copy link
Author

@oliviertassinari Sorry for long reply ... I will definitely look at it.

@rburkovsky
Copy link

rburkovsky commented May 21, 2017

I was just looking for a component that can represent an editable data grid. It would be super-nice to have this ability.

@KarmicJohn
Copy link

Also interested in this. Will this make the 1.0 cut?

@oliviertassinari
Copy link
Member

@KarmicJohn It's unlikely unless an external contributor is working on it.

@jstgermain
Copy link

Any update on this feature? I dont see anything in v1 beta 30, and am looking for this exact feature.

@FernandoGOT
Copy link

I too need such a feature, any news bout this?

@srilman
Copy link

srilman commented Jul 10, 2018

First of all, just want to point out that there are two kinds of editable table cells: one with an inline text field and another with an inline menu. (Source: https://material.io/design/components/data-tables.html#behavior).

Anyways, I am planning on making a PR for this because I need to make this element for a project. I am thinking that the syntax for the inline text field should look sometime like this:

<TableCell editable={true|false} dialogSize={'large'|'small'} editIcon={<SomeIcon />} />

and for the inline menu, it should look something like this:

<TableCell menu={<Menu><MenuItem /> ....</Menu>}></TableCell>

I am also trying to decide on whether or not to add menu and editable to the list of variants for the table cell and choose between them (like how you can switch between types of buttons in the <Button /> component.

@oliviertassinari
Copy link
Member

@srilman Does it need to be moved to the core? With the recent addition of the Popper component. I'm wondering if a simple demo in the documentation would be better suited. To investigate.

@srilman
Copy link

srilman commented Jul 16, 2018

@oliviertassinari I don't think this component needs to be in core. Putting it in the lab should be fine. I'm not sure how the Popper component relates, and adding a demo to investigate would be helpful.

@jstgermain
Copy link

What ever came of this? I still don't see any docs in order to use small or large edit dialogs.

@joshwooding
Copy link
Member

joshwooding commented Jul 27, 2019

Looks like the specs have changed and currently only list an inline menu: https://material.io/design/components/data-tables.html#behavior

Although it's not perfect here's an example: https://codesandbox.io/s/material-demo-dlmkz

@oliviertassinari
Copy link
Member

material-tables has an editable example: https://material-table.com/#/docs/features/editable.

@oliviertassinari oliviertassinari changed the title [Table] Editable cells with dialogs [Table] Editable cells Oct 2, 2019
@adeelibr
Copy link

adeelibr commented Oct 13, 2019

I made rough demo like materia;-ui tables section with an editable table example like this;

Code + Demo: https://codesandbox.io/s/material-ui-editable-tables-wsp0c
Demo: https://wsp0c.csb.app/

(I'll improve the demo, if you think it's okay 😄 ) @oliviertassinari 😅 😅

@oliviertassinari
Copy link
Member

oliviertassinari commented Oct 13, 2019

@adeelibr Thanks for sharing the code sandbox on the issue, It will likely help others.
Now, I'm not sure that we should add a new demo in the documentation. I think that we should work on a new datatable component. I think that we could have the Table component focuses on the style aspect on the table while the datatable would focus on the feature richness. This would be an opportunity to move the complex demos we have from the table component page to the datatable part of the documentation.

@adeelibr
Copy link

Can I work on the new component for Data table? Also will it be build on top of Table components with extended functionality?

@oliviertassinari
Copy link
Member

@adeelibr See mui/material-ui#17848 (comment)

@oliviertassinari oliviertassinari self-assigned this Nov 19, 2019
@oliviertassinari oliviertassinari changed the title [Table] Editable cells [DataTable] Support editable cells Nov 29, 2019
@oliviertassinari oliviertassinari removed their assignment Feb 1, 2020
@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 4, 2020

Moving to #203

@oliviertassinari oliviertassinari changed the title [DataTable] Support editable cells [DataGrid] Implement Cell editing Sep 4, 2020
@oliviertassinari oliviertassinari transferred this issue from mui/material-ui Sep 17, 2020
@oliviertassinari oliviertassinari added the component: data grid This is the name of the generic UI component, not the React module! label Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants