Skip to content

TextInput: refactor to useDisableableInput - #2071

Open
labkey-nicka wants to merge 12 commits into
developfrom
fb_disable_text_input
Open

TextInput: refactor to useDisableableInput#2071
labkey-nicka wants to merge 12 commits into
developfrom
fb_disable_text_input

Conversation

@labkey-nicka

@labkey-nicka labkey-nicka commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Rationale

This refactors TextInput and TextAreaInput to functional components so that they can use useDisableableInput for disabled state management.

Related Pull Requests

Changes

  • Refactor TextInput, TextAreaInput and TextChoiceInput to functional components
  • Remove disableInput prop on TextInput in favor of pre-existing disabled prop
  • Generate input id rather than relying on the column's fieldKey
  • Remove declared type="number" in AmountUnitInput as it was always overridden to type="text" by TextInput.
  • TextAreaInput.onChange() updated to take name parameter (consistent with other inputs)
  • TextChoiceInput is a higher-order-component of a SelectInput which implements disabled state itself. No need for useDisableableInput.
  • Tighten interface for TextChoiceInput
  • Add unit tests (none existed previously)

@labkey-nicka
labkey-nicka force-pushed the fb_disable_text_input branch from dd530ee to ec5e3c6 Compare August 31, 2026 14:51
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.

2 participants