Skip to content

fix: show required marker on legacy select widgets#41927

Open
miachillgood wants to merge 1 commit into
appsmithorg:releasefrom
miachillgood:fix/required-label-marker
Open

fix: show required marker on legacy select widgets#41927
miachillgood wants to merge 1 commit into
appsmithorg:releasefrom
miachillgood:fix/required-label-marker

Conversation

@miachillgood

@miachillgood miachillgood commented Jun 26, 2026

Copy link
Copy Markdown

Summary

  • propagate isRequired to LabelWithTooltip for the legacy select widgets covered by [Bug]: Required marker (*) not displayed on required select widgets #41734
  • pass the existing widget-level isRequired prop through SelectWidget, MultiSelectWidget, MultiSelectWidgetV2, SingleSelectTreeWidget, and MultiSelectTreeWidget
  • keep the change scoped to the older widget implementations and leave WDS widgets untouched

Root cause

These widgets already expose and use isRequired for validation, but the prop was not forwarded to the label component, so the required marker never rendered in the label UI.

Testing

  • git diff --check
  • manually verified the prop flow in the touched widget/component pairs
  • could not run yarn eslint in this minimal checkout because the workspace does not include the local install state (Couldn't find the node_modules state file)

Closes #41734

Summary by CodeRabbit

  • New Features

    • Required-field indicators now appear consistently across select, multi-select, and tree-select widgets.
    • The “required” state is now passed through to widget labels so users can see when a field must be completed.
  • Bug Fixes

    • Fixed an issue where some widget views did not reflect the required status even when configured to do so.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f0bb1b67-3f32-4675-96fa-bdccb7ba161b

📥 Commits

Reviewing files that changed from the base of the PR and between 1fdb8f7 and 6f1833d.

📒 Files selected for processing (9)
  • app/client/src/widgets/MultiSelectTreeWidget/component/index.tsx
  • app/client/src/widgets/MultiSelectTreeWidget/widget/index.tsx
  • app/client/src/widgets/MultiSelectWidget/component/index.tsx
  • app/client/src/widgets/MultiSelectWidget/widget/index.tsx
  • app/client/src/widgets/MultiSelectWidgetV2/component/index.tsx
  • app/client/src/widgets/MultiSelectWidgetV2/widget/index.tsx
  • app/client/src/widgets/SelectWidget/component/index.tsx
  • app/client/src/widgets/SingleSelectTreeWidget/component/index.tsx
  • app/client/src/widgets/SingleSelectTreeWidget/widget/index.tsx

Walkthrough

Select, multi-select, and tree-select widgets now accept an optional isRequired prop, forward it through their widget views and component props, and pass it into LabelWithTooltip so required-state rendering can be shown across these widget variants.

Changes

Required-state wiring for select widgets

Layer / File(s) Summary
Select and multi-select label wiring
app/client/src/widgets/MultiSelectWidget/component/index.tsx, app/client/src/widgets/MultiSelectWidget/widget/index.tsx, app/client/src/widgets/MultiSelectWidgetV2/component/index.tsx, app/client/src/widgets/MultiSelectWidgetV2/widget/index.tsx, app/client/src/widgets/SelectWidget/component/index.tsx
isRequired is added to the multi-select props and forwarded from the widget render into LabelWithTooltip; the select widget also passes its isRequired prop into LabelWithTooltip.
Multi tree-select required prop
app/client/src/widgets/MultiSelectTreeWidget/component/index.tsx, app/client/src/widgets/MultiSelectTreeWidget/widget/index.tsx
TreeSelectProps gains isRequired, MultiTreeSelectComponent destructures it, the widget view forwards it, and LabelWithTooltip receives it.
Single tree-select required prop
app/client/src/widgets/SingleSelectTreeWidget/component/index.tsx, app/client/src/widgets/SingleSelectTreeWidget/widget/index.tsx
TreeSelectProps gains isRequired, SingleSelectTreeComponent destructures it, the widget view forwards it, and LabelWithTooltip receives it.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A tiny star now finds its place ✨
Through select and tree and multi-select space,
isRequired travels hand in hand,
To mark the field as planned,
And bloom where labels meet the trace.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: showing the required marker on legacy select widgets.
Description check ✅ Passed The PR description includes summary, root cause, testing, and issue linkage, with only optional template sections omitted.
Linked Issues check ✅ Passed The required-marker bug in #41734 is addressed by forwarding isRequired to LabelWithTooltip across the legacy select widgets.
Out of Scope Changes check ✅ Passed The touched files stay within the legacy select widget path and do not introduce unrelated changes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

[Bug]: Required marker (*) not displayed on required select widgets

1 participant