How do I disable edit/delete on a row?
I have a totals row that I don't want the user to be able to update/delete, I have tried: editable = {{ isEditable: rowData => rowData.name === "Totals", isDeletable: rowData => rowData.name === "Totals", ... per the example, but this doesn't seem to work...is this a bug or have I done something wrong?
@jjt1234 is your column that has the title "Totals" called name? If not, then you should change rowData.name to rowData.columnName.
On another note, I am experiencing the same issue where I cannot prevent editing of rows that meet the given condition. My material-table package is up to date with 1.57.2
Done the same to disable the rows - it doesn't work for me. If you have demo somewhere - that would help. Thanks
@sakhibgareevrr I have verified that isEditable is working properly in release 1.57.2
I recommend to delete package-lock.json and /node_modules, followed by installing your dependencies (npm i). If you would like, you can also share a code snippet here or in another issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
try this
isDeletable: rowData => { rowData // isSupport = false if(isSupport) { return false } else { return true } }
or just copy paste this and test it from both false and true isDeletable: rowData => true // disabled isDeletable: rowData => false // enabled
Thanks @ildefonsorobinjohn, option 1 worked for me..