solid-orange
solid-orange6mo ago

How to edit rows directly in data grid? (MUI)

In my MUI data grid I've defined columns as editable and can access them and edit them, but can't save or call edit on button. Is there any faster way to edit and make calls without implementing all functions from MUI documentation website?
3 Replies
kapa.ai
kapa.ai6mo ago
Hi @beg1c. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the extracts, refine offers a hook called useEditableTable that can be used to edit rows directly in a data grid. When a user clicks on the edit button, isEditing(lineId) will turn true for the relevant line. This will also cause <TextInput> to show up on the line that's being edited. When the editing is finished, a new value can be saved by clicking <SaveButton>. However, the examples provided in the extracts are specific to Ant Design System, not MUI. For MUI, refine offers an editable table with react-table support. You can find an example here (https://refine.dev/docs/examples/table/mui/advanced/). If you want to see an example with MUI's DataGrid, you could create a GitHub issue. Someone from the community will surely be interested. For more detailed information, you can refer to the useEditableTable documentation (https://refine.dev/docs/ui-integrations/ant-design/hooks/use-editable-table#editing-with-buttons). Please note that the information provided is based on the extracts and may not fully cover your specific use case. For more detailed and personalized assistance, you may want to reach out to the refine community or check the MUI documentation. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai6mo ago
<@537772056847187988> kapa.ai is still learning and improving, please let us know how it did by reacting below
ambitious-aqua
ambitious-aqua6mo ago
Hello @Slemming, someone open issue for this on github https://github.com/refinedev/refine/issues/5656 we'll research what we can do to make it easier
GitHub
[FEAT]Editable MUI Data Grid · Issue #5656 · refinedev/refine
Is your feature request related to a problem? Please describe. There is currently no quick way to implement editable MUI Data Grid. Describe alternatives you've considered There is alternative ...