Cinder.Filters.Autocomplete (Cinder v0.12.1)

Copy Markdown View Source

Autocomplete filter implementation for Cinder tables.

Provides a searchable dropdown for cases where a standard select has too many options. Users type to filter the available options, with matching results shown in a dropdown.

Options

  • :options - List of {label, value} tuples (required for static mode)
  • :placeholder - Placeholder text for the search input
  • :max_results - Maximum number of results to show (default: 10)

Examples

# Static options
<:col field={:category_id} label="Category"
  filter={[
    type: :autocomplete,
    options: [{"Electronics", 1}, {"Clothing", 2}, {"Books", 3}],
    max_results: 10,
    placeholder: "Search categories..."
  ]}
/>