Skip to content

Commit ce98410

Browse files
disable "save" button when "isSaving" is true (#1032)
1 parent 8afb0f4 commit ce98410

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/material-react-table/src/components/buttons/MRT_EditActionButtons.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export const MRT_EditActionButtons = <TData extends MRT_RowData>({
106106
aria-label={localization.save}
107107
color="info"
108108
onClick={handleSubmitRow}
109+
disabled={isSaving}
109110
>
110111
{isSaving ? <CircularProgress size={18} /> : <SaveIcon />}
111112
</IconButton>
@@ -121,6 +122,7 @@ export const MRT_EditActionButtons = <TData extends MRT_RowData>({
121122
onClick={handleSubmitRow}
122123
sx={{ minWidth: '100px' }}
123124
variant="contained"
125+
disabled={isSaving}
124126
>
125127
{isSaving && <CircularProgress color="inherit" size={18} />}
126128
{localization.save}

0 commit comments

Comments
 (0)