Skip to content

feat: allow passing disabled prop to PersistButton#22

Merged
vparys merged 1 commit intomainfrom
feat/persist-button-disabled
Apr 20, 2026
Merged

feat: allow passing disabled prop to PersistButton#22
vparys merged 1 commit intomainfrom
feat/persist-button-disabled

Conversation

@vparys
Copy link
Copy Markdown
Member

@vparys vparys commented Apr 20, 2026

Summary

  • Adds a pass-through disabled prop to PersistButton
  • Combines the caller-provided value with the internal isPersisting || !isDirty state so callers can force-disable the button without losing the built-in behavior

Test plan

  • Pass disabled={true} to PersistButton and verify the button is disabled even when the form is dirty
  • Leave disabled unset and verify the button still disables while persisting or when nothing is dirty

Extracts disabled from props and combines it with the internal
isPersisting/!isDirty state so callers can force-disable the button.
@vparys vparys merged commit 5ef0ca9 into main Apr 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant