fix: widget disable option is not supported on Multiselect, Tags, Datepicker and RadioButton#2846
Open
Allaoua9 wants to merge 3 commits intoChainlit:mainfrom
Open
fix: widget disable option is not supported on Multiselect, Tags, Datepicker and RadioButton#2846Allaoua9 wants to merge 3 commits intoChainlit:mainfrom
Allaoua9 wants to merge 3 commits intoChainlit:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="frontend/src/components/ChatSettings/DatePickerInput.tsx">
<violation number="1" location="frontend/src/components/ChatSettings/DatePickerInput.tsx:102">
P2: Disabling while the popover is open can leave it stuck open because `onOpenChange` is removed (and range mode ignores close events), so the controlled `open` state can no longer be updated to `false`. This results in a disabled field still showing an interactive popover (Reset/Confirm remain active).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Contributor
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="frontend/src/components/ChatSettings/DatePickerInput.tsx">
<violation number="1" location="frontend/src/components/ChatSettings/DatePickerInput.tsx:179">
P2: Disabled guard in `handleOpenChange` blocks close events, so an already-open date picker can remain stuck open when `disabled` changes to true.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was implemented in collaboration with @tonca, many thanks to him !
Summary by cubic
Add proper disabled-state support for DatePicker (single and range), MultiSelect, Tags, and RadioButton so they ignore input and show disabled styles. Backend now sends the
disabledflag for DatePicker to keep UI in sync.disabled; stop range updates; add cursor-not-allowed on trigger.disabled; disable tag remove buttons; add disabled cursors to input and badges.disabledprop; pass toRadioGroupandRadioGroupItem.disabled; add disabled styles and cursors.disabledinDatePicker.to_dictso the frontend respects it.Written for commit 4b59238. Summary will update on new commits.