Skip to content

fix(frontend): show required marker for select and multiselect widgets#41735

Open
Arbab1308 wants to merge 1 commit intoappsmithorg:releasefrom
Arbab1308:fix/select-required-marker
Open

fix(frontend): show required marker for select and multiselect widgets#41735
Arbab1308 wants to merge 1 commit intoappsmithorg:releasefrom
Arbab1308:fix/select-required-marker

Conversation

@Arbab1308
Copy link
Copy Markdown

@Arbab1308 Arbab1308 commented Apr 11, 2026

Description

This PR fixes the bug where required Select widgets do not display the red * required marker, even when the "Required" validation is enabled.

What changed

  • Passed the isRequired flag from the Select and MultiSelect widgets down to their label components.
  • Ensured the shared label component renders the * for both Select and MultiSelect when Required is enabled.

Testing

  • Manual: Created forms with Select and MultiSelect widgets, turned Validation → Required ON, and verified that the * appears next to the labels. Turning Required OFF hides the *.

Fixes

Summary by CodeRabbit

  • New Features
    • Multi-select and select widgets now support displaying required field indicators.
    • Multi-select widgets now support dynamic height adjustment.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 11, 2026

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: 35051d09-2ab8-48c0-9703-6deb80d770db

📥 Commits

Reviewing files that changed from the base of the PR and between 5743047 and 2e0a3e0.

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

Walkthrough

The PR addresses a bug where required markers weren't displayed on select and multi-select widgets. The fix threads the isRequired prop from widget components down to the LabelWithTooltip component, enabling the required asterisk to render correctly.

Changes

Cohort / File(s) Summary
Select widget label updates
app/client/src/widgets/SelectWidget/component/index.tsx, app/client/src/widgets/MultiSelectWidget/component/index.tsx
Added isRequired prop to component interfaces and passed it to LabelWithTooltip to display the required marker.
MultiSelect widget prop forwarding
app/client/src/widgets/MultiSelectWidget/widget/index.tsx
Forwarded isRequired and isDynamicHeightEnabled props to MultiSelectComponent in the render path.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🌟 An asterisk lost, now found at last,
Required fields shine, validation's cast,
Through props it flows, from widget down,
The red star gleams on select's crown! ✨

🚥 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 accurately describes the primary change: adding required marker display to select and multiselect widgets.
Description check ✅ Passed The description clearly explains the bug fix, what changed, and includes manual testing verification, but lacks a link to the referenced issue.
Linked Issues check ✅ Passed The changes directly address issue #41734 by passing the isRequired flag to label components for Select and MultiSelect widgets, enabling the required marker display.
Out of Scope Changes check ✅ Passed All changes are focused on the stated objective of displaying required markers for Select and MultiSelect widgets; no extraneous modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@Arbab1308
Copy link
Copy Markdown
Author

Opened PR #41735 to fix this

This reuses the existing required label behavior for select/multiselect

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