Skip to content

fix: show required marker on legacy select widgets#41927

Open
miachillgood wants to merge 2 commits into
appsmithorg:releasefrom
miachillgood:fix/required-label-marker
Open

fix: show required marker on legacy select widgets#41927
miachillgood wants to merge 2 commits 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 are now supported across select, multi-select, single tree-select, and multi tree-select widgets.
    • Widget labels can display required state consistently when that configuration is provided.
  • Bug Fixes

    • Fixed cases where the “required” status was not reflected in the rendered widget label for certain select and tree-select views, even though the setting existed.

@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: 00da51cd-300f-44da-ba1f-a212637cd947

📥 Commits

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

📒 Files selected for processing (5)
  • app/client/src/widgets/MultiSelectTreeWidget/component/index.tsx
  • app/client/src/widgets/MultiSelectWidget/component/index.tsx
  • app/client/src/widgets/MultiSelectWidgetV2/component/index.tsx
  • app/client/src/widgets/SelectWidget/component/index.tsx
  • app/client/src/widgets/SingleSelectTreeWidget/component/index.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • app/client/src/widgets/SelectWidget/component/index.tsx
  • app/client/src/widgets/MultiSelectWidgetV2/component/index.tsx
  • app/client/src/widgets/SingleSelectTreeWidget/component/index.tsx
  • app/client/src/widgets/MultiSelectWidget/component/index.tsx
  • app/client/src/widgets/MultiSelectTreeWidget/component/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

Suggested labels: ok-to-test
Suggested reviewers: subrata71

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 summarizes the main change: showing the required marker on legacy select widgets.
Description check ✅ Passed The description includes the summary, root cause, testing, and issue reference, covering the required context well.
Linked Issues check ✅ Passed The PR forwards isRequired to LabelWithTooltip across the affected select widgets, which should restore the required marker for #41734.
Out of Scope Changes check ✅ Passed The diff stays focused on wiring isRequired through legacy select widgets, with only comment additions outside runtime behavior.
✨ 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.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions Bot added the Stale label Jul 3, 2026
@j0hnby

j0hnby commented Jul 4, 2026

Copy link
Copy Markdown

@miachillgood - this has been marked as stale as there are checks failed
~

❌ 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.

@github-actions github-actions Bot removed the Stale label Jul 4, 2026
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

2 participants