feat(Combobox): add per-option optionLeftIcon slot with $ctx.option data (MET-2954) - #60
Merged
Merged
Conversation
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
dosmiko7
approved these changes
Jun 19, 2026
$ctx.option data (MET-2954)
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an
optionLeftIconrender slot toRawCombobox, rendered once per option. Each option is wrapped in aMemoDataProviderexposing 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
optionLeftIcon(slot),optionLeftIconClassName,optionContentClassNameprovidesData: trueso Plasmic Studio surfaces$ctx.optionin the data picker inside the slotoptionContentClassNameso the icon can sit left while text stays a column (styleoptionClassNameas a flex row)Usage
In Studio: drop a component into the
optionLeftIconslot and bind its props to$ctx.option.*.Notes
optionContentClassNamewrapper renders even when no icon is set (harmless extra div; needed for the flex layout).