Form/Documents: disable buttons if no files are selected for upload
This commit is contained in:
parent
7590352ba5
commit
381ba678d9
@ -41,10 +41,12 @@ export function Buttons() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="grid grid-cols-1 gap-2 gap-x-4 md:grid-cols-3">
|
<div className="grid grid-cols-1 gap-2 gap-x-4 md:grid-cols-3">
|
||||||
<Button intent="outline-danger" onClick={handleCancel}>
|
<Button intent="outline-danger" onClick={handleCancel} disabled={!formFiles.length}>
|
||||||
Отмена
|
Отмена
|
||||||
</Button>
|
</Button>
|
||||||
<Button onClick={handleUploadFiles}>Загрузить файлы</Button>
|
<Button onClick={handleUploadFiles} disabled={!formFiles.length}>
|
||||||
|
Загрузить файлы
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user