From 2e52abbee1307e00298404795a1c235438a5e345 Mon Sep 17 00:00:00 2001 From: Dobricean Ioan Dorian <50819975+dobri1408@users.noreply.github.com> Date: Thu, 11 Sep 2025 13:30:24 +0300 Subject: [PATCH 1/9] multiselect widget --- .../MultiSelect/MultiSelect.quanta.tsx | 48 ++++++++++++++++--- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/packages/components/src/components/MultiSelect/MultiSelect.quanta.tsx b/packages/components/src/components/MultiSelect/MultiSelect.quanta.tsx index fff39fcbf2b..488aa2e4ec4 100644 --- a/packages/components/src/components/MultiSelect/MultiSelect.quanta.tsx +++ b/packages/components/src/components/MultiSelect/MultiSelect.quanta.tsx @@ -10,6 +10,8 @@ import { TagGroup, TagList, Tag, + FieldError, + type ValidationResult, } from 'react-aria-components'; import { Description, Label } from '../Field/Field.quanta'; import { useListData } from 'react-stately'; @@ -32,9 +34,16 @@ export interface MultiSelectProps { placeholder?: string; label?: string; description?: string; + errorMessage?: string | ((validation: ValidationResult) => string); creatable?: boolean; + onChange?: (selectedItems: Array) => void; + onBlur?: () => void; + onFocus?: () => void; onItemInserted?: (key: Key) => void; onItemCleared?: (key: Key) => void; + isDisabled?: boolean; + isReadOnly?: boolean; + isRequired?: boolean; renderEmptyState?: (inputValue: string) => React.ReactNode; } @@ -44,11 +53,18 @@ export function MultiSelect({ items, className = '', description, + errorMessage, + onChange, + onBlur, + onFocus, onItemCleared, onItemInserted, renderEmptyState, selectedItems, creatable = true, + isDisabled = false, + isReadOnly = false, + isRequired = false, ...props }: MultiSelectProps