-
Notifications
You must be signed in to change notification settings - Fork 148
Closed
Labels
STATUS-1: needs triageThis doesn't seem rightThis doesn't seem rightTYPE: bugSomething isn't workingSomething isn't working
Description
Which package is affected?
Headless Kit
Describe the bug
When changing the disabled attribute on a Select.Root component after the component has been created, the component state doesn't change to reflect the new value
Reproduction
https://stackblitz.com/edit/qwik-starter-msxbxx?file=src/routes/index.tsx
Steps to reproduce
- Click on the select button to confirm that no popover is displayed
- Uncheck the disabled checkbox
- Click on the select button
Expected:
- The popover would display
Actual:
- The popover doesn't display, the select is still in a disabled state
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
@builder.io/qwik: ^1.4.3 => 1.5.5
@builder.io/qwik-city: ^1.4.3 => 1.4.3
@qwik-ui/headless: ^0.4.2 => 0.4.2
typescript: 5.3.3 => 5.3.3
undici: 5.28.2 => 5.28.2
vite: 4.5.2 => 4.5.2Additional Information
This works in the reverse as well. Change the signal initial value to false (enabled) and then check the checkbox and the select also doesn't become disabled.
At a guess, it's because this is trying to track a boolean value and not a signal, so the task isn't firing after the first time:
useTask$(({ track }) => {
context.disabled = track(() => disabled);
});
Metadata
Metadata
Assignees
Labels
STATUS-1: needs triageThis doesn't seem rightThis doesn't seem rightTYPE: bugSomething isn't workingSomething isn't working