Skip to content

Color Picker Input | Fix warning and clear value#165

Merged
manni497 merged 39 commits intoneolution-ch:mainfrom
Michele-Masciave:fix/picker-input-warning
Apr 16, 2026
Merged

Color Picker Input | Fix warning and clear value#165
manni497 merged 39 commits intoneolution-ch:mainfrom
Michele-Masciave:fix/picker-input-warning

Conversation

@Michele-Masciave
Copy link
Copy Markdown
Contributor

@Michele-Masciave Michele-Masciave commented Apr 15, 2026

FIX 1: usual MUI warning when value is not defined

if value is undefined

Fix the warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.

if value is null

value prop on input should not be null. Consider using an empty string to clear the component or undefined for uncontrolled components.

FIX 2: color picker couldn't be cleared if value was already present (field.value not consistent with current watched value)

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 15, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@neolution-ch/react-hook-form-components@165

commit: 8579cc1

@Michele-Masciave Michele-Masciave changed the title Fix/picker input warning Color Picker Input | Fix warning and clear value Apr 15, 2026
@Michele-Masciave Michele-Masciave marked this pull request as ready for review April 15, 2026 16:53
@manni497 manni497 merged commit ecc50ee into neolution-ch:main Apr 16, 2026
14 checks passed
@Michele-Masciave Michele-Masciave deleted the fix/picker-input-warning branch April 16, 2026 06:24
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