Closed KippWade closed 3 months ago
I'll take a look
With new CodeSandbox rules, I'm not sure you can get to that sandbox now?
Yes I cant see it. Thats annoying..
Should be able to see it now. They defaulted to everything to be private, and I just made it public.
Thanks, Ill check it out.
This is defiantly something to do with using parent/child. For some reason, the delete text just isn't inserted.
I've been looking through code, but haven't been able to find anything obvious as of yet.
In MTableEditRow, the localization that is passed on non group rows and the nested child rows are coming through differently. I'm trying to trace through where it is getting the different localization objects.
MTableEditRow:
Other edit rows when deleting, the localization.deleteText is displayed: props: localization: { "saveTooltip": "Save", "cancelTooltip": "Cancel", "deleteText": "Are you sure you want to delete this row?" }
when it's child of child, there is no localization.deleteText in this object, but it's in localization.editRow.deleteText.... props: localization: { "addToolTip": "Add", "bulkEditApprove": "Save all changes", "bulkEditCancel": "Discard all changes", "bulkEditTooltip": "Edit All", ... editRow: { "cancelTooltip": "Cancel", "dateTimePickerLocalization": undefined, "deleteText": "Are you sure you want to delete this row?", "saveTooltip": "Save", ... } ... }
That seems like an easy fix. Would you mind creating a PR to address this?
I will create one tonight. If found that if in MTableBodyRow I pass localization.editRow in the create element, it looks to work in every instance.
Describe the bug When using the parent/child option, a child of a child with children will not show the deletion text "Are you sure you want to delete this row?"
To Reproduce https://codesandbox.io/p/sandbox/material-table-core-parent-child-forked-8rk59g
Expected behavior Expected to see the default "Are you sure you want to delete this row?" text.
Screenshots
Desktop: