Skip to content

[6.x] Fix Combobox trigger classes not reacting to prop changes - #15133

Merged
duncanmcclean merged 1 commit into
6.xfrom
combobox-disabled-classes
Aug 7, 2026
Merged

[6.x] Fix Combobox trigger classes not reacting to prop changes#15133
duncanmcclean merged 1 commit into
6.xfrom
combobox-disabled-classes

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request fixes an issue where the Combobox component's disabled styling wouldn't apply or unapply when the disabled prop changed after the initial render.

This was happening because triggerClasses invoked the cva factory immediately during setup, rather than inside a computed. The variant, size, readOnly and disabled props were read once and baked into a static string, so any subsequent change to them was never reflected in the class list.

This PR fixes it by wrapping triggerClasses in a computed, matching how Input.vue and Button.vue already build their classes.

`triggerClasses` invoked the `cva` factory during setup, so `disabled`,
`readOnly`, `variant` and `size` were read once and baked into a static
string. Wrapping it in `computed` matches `Input.vue` and `Button.vue`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@duncanmcclean
duncanmcclean merged commit 6336c23 into 6.x Aug 7, 2026
23 checks passed
@duncanmcclean
duncanmcclean deleted the combobox-disabled-classes branch August 7, 2026 10:05
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