fix: disable create list and label button when input is empty (#130)

This commit is contained in:
Ridham Khandar
2025-07-29 02:19:24 +05:30
committed by GitHub
parent f8827da73a
commit ca1dd92ab4
2 changed files with 9 additions and 1 deletions

View File

@@ -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>

View File

@@ -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>