Добавлена блокировка кнопки удаления при редактировании записи в таблице

This commit is contained in:
goodmice 2022-06-15 13:57:48 +05:00
parent db41e9dabb
commit 88fc1bf09f

View File

@ -210,8 +210,8 @@ export const EditableTable = memo(({
/> />
)} )}
{onDelete && ( {onDelete && (
<Popconfirm title={'Удалить?'} onConfirm={() => deleteRow(record)}> <Popconfirm disabled={editingKey !== ''} title={'Удалить?'} onConfirm={() => deleteRow(record)}>
<Button icon={<DeleteOutlined/>}/> <Button disabled={editingKey !== ''} icon={<DeleteOutlined/>}/>
</Popconfirm> </Popconfirm>
)} )}
{additionalButtons?.(record, editingKey)} {additionalButtons?.(record, editingKey)}