Start time grid #62

Merged
stne3960 merged 30 commits from start_time_grid into main 2026-01-16 14:17:09 +01:00
2 changed files with 11 additions and 0 deletions
Showing only changes of commit eacaf56cac - Show all commits

View File

@ -25,6 +25,7 @@ export interface ComboboxProps<T> {
onChange?: (value: string | string[]) => void; onChange?: (value: string | string[]) => void;
/** Called when search term changes. When provided, local filtering is disabled (assumes API filtering). */ /** Called when search term changes. When provided, local filtering is disabled (assumes API filtering). */
onSearchChange?: (term: string) => void; onSearchChange?: (term: string) => void;
error?: boolean;
} }
const widthClasses: Record<ComboboxSize, string> = { const widthClasses: Record<ComboboxSize, string> = {
@ -77,6 +78,7 @@ export default function Combobox<T>({
value, value,
onChange, onChange,
onSearchChange, onSearchChange,
error = false,
}: ComboboxProps<T>) { }: ComboboxProps<T>) {
// Convert value (undefined | string | string[]) to always be an array // Convert value (undefined | string | string[]) to always be an array
const selectedValues: string[] = const selectedValues: string[] =
@ -226,6 +228,7 @@ export default function Combobox<T>({
fullWidth={fullWidth || !!customWidth} fullWidth={fullWidth || !!customWidth}
customWidth={customWidth} customWidth={customWidth}
Icon={SearchIcon} Icon={SearchIcon}
error={error}
/> />
{isOpen && ( {isOpen && (

View File

@ -20,6 +20,8 @@ export interface ParticipantPickerProps<T>
customWidth?: string; customWidth?: string;
/** Called when search term changes. When provided, local filtering is disabled (assumes API filtering). */ /** Called when search term changes. When provided, local filtering is disabled (assumes API filtering). */
onSearchChange?: (term: string) => void; onSearchChange?: (term: string) => void;
error?: boolean;
message?: string;
} }
const widthClasses: Record<ComboboxSize, string> = { const widthClasses: Record<ComboboxSize, string> = {
@ -43,6 +45,8 @@ export default function ParticipantPicker<T>({
fullWidth = false, fullWidth = false,
customWidth, customWidth,
onSearchChange, onSearchChange,
error = false,
message,
className, className,
style, style,
...props ...props
@ -80,6 +84,7 @@ export default function ParticipantPicker<T>({
fullWidth fullWidth
multiple multiple
onSearchChange={onSearchChange} onSearchChange={onSearchChange}
error={error}
/> />
{selectedOptions.length > 0 && ( {selectedOptions.length > 0 && (
<div className="flex flex-col gap-(--spacing-sm)"> <div className="flex flex-col gap-(--spacing-sm)">
@ -93,6 +98,9 @@ export default function ParticipantPicker<T>({
))} ))}
</div> </div>
)} )}
{message && (
<span className="body-light-sm text-base-ink-strong">{message}</span>
)}
</div> </div>
); );
} }