Props for the SearchableFilterList component.

interface SearchableFilterListProps<T> {
    items: T[];
    selectedItems: T[];
    onToggle: (item: T) => void;
    label?: (item: T) => string;
    shouldShowSelectClear?: boolean;
    onSelectAll?: () => void;
    onClearAll?: () => void;
    maxHeight?: string;
    searchPlaceholder?: string;
    getItemId?: (item: T) => string;
}

Type Parameters

  • T

Properties

items: T[]

Array of items to display as checkboxes

selectedItems: T[]

Currently selected items

onToggle: (item: T) => void

Callback when an item checkbox is toggled

label?: (item: T) => string

Label formatter function (optional, defaults to item toString)

shouldShowSelectClear?: boolean

Whether to show Select All/Clear buttons

onSelectAll?: () => void

Callback for select all button

onClearAll?: () => void

Callback for clear all button

maxHeight?: string

Max height for scrollable container

searchPlaceholder?: string

Placeholder text for search input

getItemId?: (item: T) => string