Skip to content

fix: color-picker panel not syncing when manually editing input - #19298

Merged
danharrin merged 1 commit into
filamentphp:4.xfrom
people-sea:fix/issues/19286
Feb 19, 2026
Merged

fix: color-picker panel not syncing when manually editing input#19298
danharrin merged 1 commit into
filamentphp:4.xfrom
people-sea:fix/issues/19286

Conversation

@people-sea

@people-sea people-sea commented Feb 19, 2026

Copy link
Copy Markdown
Member

Description

Fixes: #19286

$refs.panel pointed to the wrapper div instead of the actual color picker web component, so panel.color = value was a no-op. Added x-ref="picker" on the <*-color-picker> element and a debounced $watch on state to keep the picker in sync with manual input. The debounce avoids re-rendering the picker on every keystroke, and CSS.supports() filters out incomplete values mid-typing.

Visual changes

before

before.mov

after

after.mov

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@danharrin danharrin added the bug Something isn't working label Feb 19, 2026
@danharrin danharrin added this to the v4 milestone Feb 19, 2026
@danharrin
danharrin merged commit 90b1ce4 into filamentphp:4.x Feb 19, 2026
24 checks passed
@people-sea
people-sea deleted the fix/issues/19286 branch February 27, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ColorPicker panel value does not update when manually chaging the input

2 participants