From c8f9276967f64cf0a9ba1b443c5e0cadafc512e5 Mon Sep 17 00:00:00 2001 From: Craig Hughes Date: Thu, 30 Oct 2025 11:22:01 +0000 Subject: [PATCH] feat(multi-select): add optional displayValue prop for label overrides --- src/components/multi-select.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/multi-select.tsx b/src/components/multi-select.tsx index 0770a93..4eb4834 100644 --- a/src/components/multi-select.tsx +++ b/src/components/multi-select.tsx @@ -80,6 +80,8 @@ interface MultiSelectOption { label: string; /** The unique value associated with the option. */ value: string; + /** Optional label override for content that needs to be visible but not searchable. */ + displayValue?: string | React.ReactNode; /** Optional icon component to display alongside the option. */ icon?: React.ComponentType<{ className?: string }>; /** Whether this option is disabled */ @@ -1159,7 +1161,7 @@ export const MultiSelect = React.forwardRef( aria-hidden="true" /> )} - {option.label} + {option.displayValue || option.label} ); })}