Honor UntilChanged in sync; let SearchSelect own its disabled look
Follow-ups on the add-form fixes: - syncSelectInputUntilChanged now actually stops mirroring once the user edits the target (the "UntilChanged" contract). The old focus-based stop was a no-op (wrong removeEventListener reference), so live sync kept clobbering a manually-edited Sort name. Track dirty targets in a Set keyed by syncData index; programmatic writes don't fire "input", so only real user edits mark a target dirty. Drops the dead focus listener. - SearchSelect now greys itself when disabled, via has-[:disabled]: utilities on its container class — the visible "box" is the wrapper <div>, so disabling the transparent inner input alone left it looking active. The component owns its disabled appearance; callers only toggle the inner control's `disabled`. - Document the composite-widget disabling approach in CLAUDE.md and the SearchSelect docstring. Extends the e2e tests: sync drops after a manual Sort name edit; disabled related-game wrapper computes opacity 0.5 (and 1 when re-enabled). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -3430,6 +3430,16 @@
|
||||
outline-style: none;
|
||||
}
|
||||
}
|
||||
.has-\[\:disabled\]\:cursor-not-allowed {
|
||||
&:has(*:is(:disabled)) {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
.has-\[\:disabled\]\:opacity-50 {
|
||||
&:has(*:is(:disabled)) {
|
||||
opacity: 50%;
|
||||
}
|
||||
}
|
||||
.data-\[search-select-highlighted\]\:bg-brand {
|
||||
&[data-search-select-highlighted] {
|
||||
background-color: var(--color-brand);
|
||||
|
||||
Reference in New Issue
Block a user