Skip to content

fix: widget disable option is not supported on Multiselect, Tags, Datepicker and RadioButton#2846

Merged
dokterbob merged 3 commits intoChainlit:mainfrom
Allaoua9:fix/improved-disabled-support
Apr 1, 2026
Merged

fix: widget disable option is not supported on Multiselect, Tags, Datepicker and RadioButton#2846
dokterbob merged 3 commits intoChainlit:mainfrom
Allaoua9:fix/improved-disabled-support

Conversation

@Allaoua9
Copy link
Copy Markdown
Contributor

@Allaoua9 Allaoua9 commented Mar 17, 2026

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 disabled flag for DatePicker to keep UI in sync.

  • Bug Fixes
    • DatePicker: prevent popover opening for single and range when disabled; stop range updates; add cursor-not-allowed on trigger.
    • MultiSelect: ignore key actions when disabled; disable tag remove buttons; add disabled cursors to input and badges.
    • RadioButtonGroup: add disabled prop; pass to RadioGroup and RadioGroupItem.
    • Tags: block tag removal and input when disabled; add disabled styles and cursors.
    • Backend: include disabled in DatePicker.to_dict so the frontend respects it.

Written for commit 4b59238. Summary will update on new commits.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working frontend Pertains to the frontend. labels Mar 17, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

This PR is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Apr 1, 2026
Copy link
Copy Markdown
Contributor

@hayescode hayescode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed via Codex

LGTM.

@dokterbob dokterbob added this pull request to the merge queue Apr 1, 2026
Merged via the queue into Chainlit:main with commit dbc9909 Apr 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working frontend Pertains to the frontend. size:M This PR changes 30-99 lines, ignoring generated files. stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants