block ReloadButton while fetching
This commit is contained in:
parent
fdf795b47d
commit
a01f99315b
@ -7,12 +7,17 @@ import { ReloadOutlined } from 'ui/elements/icons';
|
||||
export const ReloadButton = observer(
|
||||
({ storeSelector, onClick }: { onClick: () => void; storeSelector: StoreSelector }) => {
|
||||
const { $tables } = useStore();
|
||||
const { validation } = storeSelector($tables.elt);
|
||||
const { validation, getRows: rows } = storeSelector($tables.elt);
|
||||
|
||||
const hasErrors = validation.hasErrors;
|
||||
|
||||
return (
|
||||
<Button onClick={onClick} disabled={hasErrors} shape="circle" icon={<ReloadOutlined />} />
|
||||
<Button
|
||||
onClick={onClick}
|
||||
disabled={hasErrors || rows.some((x) => x.status === 'fetching')}
|
||||
shape="circle"
|
||||
icon={<ReloadOutlined />}
|
||||
/>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user