fix: disable create list and label button when input is empty (#130)
This commit is contained in:
@@ -229,6 +229,9 @@ export function LabelForm({
|
|||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
isLoading={updateLabel.isPending || createLabel.isPending}
|
isLoading={updateLabel.isPending || createLabel.isPending}
|
||||||
|
disabled={
|
||||||
|
!watch("name")
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{isEdit ? t`Update label` : t`Create label`}
|
{isEdit ? t`Update label` : t`Create label`}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -145,7 +145,12 @@ export function NewListForm({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Button type="submit">{t`Create list`}</Button>
|
<Button
|
||||||
|
type="submit"
|
||||||
|
disabled={createList.isPending || !watch("name")}
|
||||||
|
>
|
||||||
|
{t`Create list`}
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user