Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make components optional un/controllable and init with values #1667

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simensee
Copy link
Contributor

Summary of Changes in This PR

  • Refactored Checkbox & Input components to enforce best practices for controlled vs. uncontrolled behavior, preventing React warnings.

  • Introduced PrimitiveCheckboxProps and PrimitiveInputProps for better type safety and reusability.

  • Extracted getDefaultValues helper in RecruitmentPositionForm to centralize default values and improve maintainability.

  • Ensured form inputs always receive defined values by updating useForm initialization and form.reset().

  • Improved readability & structure by simplifying prop handling, restructuring long expressions, and using optional chaining.

@simensee simensee self-assigned this Jan 30, 2025
@simensee simensee linked an issue Jan 30, 2025 that may be closed by this pull request
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.

Multiselect issue
1 participant