ELT: disable reload button by $process
This commit is contained in:
parent
5f7586bb0d
commit
94a39925d5
@ -7,7 +7,7 @@ import { Flex } from 'ui/grid';
|
||||
|
||||
export const ReloadButton = observer(
|
||||
({ storeSelector, onClick }: { onClick: () => void; storeSelector: StoreSelector }) => {
|
||||
const { $tables } = useStore();
|
||||
const { $tables, $process } = useStore();
|
||||
const { validation, getRows: rows } = storeSelector($tables.elt);
|
||||
|
||||
const hasErrors = validation.hasErrors;
|
||||
@ -16,7 +16,12 @@ export const ReloadButton = observer(
|
||||
<Flex justifyContent="center">
|
||||
<Button
|
||||
onClick={onClick}
|
||||
disabled={hasErrors}
|
||||
disabled={
|
||||
hasErrors ||
|
||||
$process.has('LoadKP') ||
|
||||
$process.has('Calculate') ||
|
||||
$process.has('CreateKP')
|
||||
}
|
||||
loading={rows.some((x) => x.status === 'fetching')}
|
||||
shape="circle"
|
||||
icon={<ReloadOutlined rev="" />}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user