Skip to content

feat(Combobox): add per-option optionLeftIcon slot with $ctx.option data (MET-2954) - #60

Merged
Zayooo00 merged 1 commit into
mainfrom
feat/combobox-option-left-icon
Jun 19, 2026
Merged

feat(Combobox): add per-option optionLeftIcon slot with $ctx.option data (MET-2954)#60
Zayooo00 merged 1 commit into
mainfrom
feat/combobox-option-left-icon

Conversation

@Zayooo00

Copy link
Copy Markdown
Contributor

What

Adds an optionLeftIcon render slot to RawCombobox, rendered once per option. Each option is wrapped in a MemoDataProvider exposing the current option as $ctx.option, so the slot content adapts per option (e.g. render a status icon driven by the option's data) without hardcoding anything in the component.

Changes

  • New props: optionLeftIcon (slot), optionLeftIconClassName, optionContentClassName
  • providesData: true so Plasmic Studio surfaces $ctx.option in the data picker inside the slot
  • Label + description wrapped in optionContentClassName so the icon can sit left while text stays a column (style optionClassName as a flex row)

Usage

<Combobox
  options={[{ label: 'Demographics', value: 'demo', status: 'complete' }]}
  optionLeftIcon={<SectionStatus status={$ctx.option.status} />}
/>

In Studio: drop a component into the optionLeftIcon slot and bind its props to $ctx.option.*.

Notes

  • optionContentClassName wrapper renders even when no icon is set (harmless extra div; needed for the flex layout).
  • Runtime behavior of the dropdown is unchanged.

Adds an `optionLeftIcon` render slot to RawCombobox, rendered once per
option. Each option is wrapped in a MemoDataProvider exposing the current
option as `$ctx.option`, so the slot content can adapt per option (e.g.
render a status icon based on the option's data).

- new props: optionLeftIcon (slot), optionLeftIconClassName,
  optionContentClassName
- providesData: true so Studio surfaces $ctx.option in the data picker
- label/description wrapped in optionContentClassName for icon-left layout
@Zayooo00 Zayooo00 self-assigned this Jun 19, 2026
@Zayooo00
Zayooo00 requested a review from dosmiko7 June 19, 2026 08:24
@Zayooo00 Zayooo00 changed the title feat(Combobox): add per-option optionLeftIcon slot with $ctx.option data feat(Combobox): add per-option optionLeftIcon slot with $ctx.option data (MET-2954) Jun 19, 2026
@notion-workspace

Copy link
Copy Markdown

@Zayooo00
Zayooo00 merged commit 7353e24 into main Jun 19, 2026
2 checks passed
@Zayooo00
Zayooo00 deleted the feat/combobox-option-left-icon branch June 19, 2026 08:26
Zayooo00 added a commit to myevaluations/myevals-plasmic-utils that referenced this pull request Jun 24, 2026
…Icon — MET-2954) (#3)

* feat(Combobox): add disabled property to options (MET-2795) (fullstackhouse#59)

* feat(Combobox): add disabled property to options (MET-2795)

* feat(Combobox): add disabled option styling

* feat(Combobox): add per-option optionLeftIcon slot with `$ctx.option data` (MET-2954) (fullstackhouse#60)

Adds an `optionLeftIcon` render slot to RawCombobox, rendered once per
option. Each option is wrapped in a MemoDataProvider exposing the current
option as `$ctx.option`, so the slot content can adapt per option (e.g.
render a status icon based on the option's data).

- new props: optionLeftIcon (slot), optionLeftIconClassName,
  optionContentClassName
- providesData: true so Studio surfaces $ctx.option in the data picker
- label/description wrapped in optionContentClassName for icon-left layout

* feat(HighlightedText): support multiple highlight words (MET-2954) (fullstackhouse#61)

Accept `string | string[]` for the `highlight` prop so multiple words can
be highlighted at once (e.g. ["APE", "GME"]). Single-string usage is
unchanged. Register description documents the array-via-dynamic-value path.
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.

2 participants