OctantisWeb.Components.Polaris.Filters (octantis v0.1.12)
View SourceFilters is a composite component that filters the items of a list or table.
Examples
</.skeleton_display_text>
See
- https://polaris.shopify.com/components/selection-and-input/filters
- https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Filters/Filters.tsx
- https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Filters/components/FiltersBar/FiltersBar.tsx
- https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Filters/components/FilterPill/FilterPill.tsx
Summary
Functions
Attributes
id
(:string
) (required)label
(:string
) (required)unsaved_changes
(:boolean
) - Whether the filter is newly applied or updated and hasnt been saved. Defaults tofalse
.filter_key
(:string
) (required) - A unique identifier for the filter.selected
(:boolean
) - Whether the filter is selected or not. Defaults tofalse
.initial_active
(:boolean
) - Whether the Popover will be initially open or not. Defaults tofalse
.hide_clear_button
(:boolean
) - Defaults tofalse
.disabled
(:boolean
) - Whether filtering is disabled. Defaults tofalse
.close_on_child_overlay_click
(:boolean
) - Whether the filter should close when clicking inside another Popover.on_remove
(:any
) - Callback invoked when the filter is removed. Defaults tonil
.
Slots
filter
Filters is a composite component that filters the items of a list or table.
Attributes
id
(:string
) (required)filters
(:list
) - Available filters added to the filter bar. Shortcut filters are pinned to the front of the bar. Defaults to[]
.on_clear_all
(:any
) - Callback when the reset all button is pressed. Defaults tonil
.on_toggle_filter
(:any
) - Callback for when a filter is applied or unapplied. Defaults tonil
.disabled
(:boolean
) - Disable all filters. Defaults tofalse
.hide_query_field
(:boolean
) - Hide the query field. Defaults tofalse
.disable_filters
(:boolean
) - Disable the filters. Defaults tofalse
.on_add_filter_click
(:any
) - Callback when the add filter button is clicked. Defaults tonil
.close_on_child_overlay_click
(:boolean
) - Whether the filter should close when clicking inside another Popover. Defaults tofalse
.
Slots
inner_block
Attributes
id
(:string
) - Defaults tonil
.query_form
(Phoenix.HTML.Form
) - Defaults tonil
.phx_submit
(:any
) - Defaults tonil
.phx_change
(:any
) - Defaults tonil
.phx_focus
(:any
) - Defaults tonil
.phx_blur
(:any
) - Defaults tonil
.on_clear
(:any
) - Defaults tonil
.focused
(:boolean
) - Defaults tofalse
.placeholder
(:string
) - Defaults tonil
.disabled
(:boolean
) - Defaults tofalse
.borderless_query_field
(:boolean
) - Defaults tofalse
.loading
(:boolean
) - Show a loading spinner to the right of the input. Defaults tofalse
.
Slots
inner_block
Functions
Attributes
id
(:string
) (required)label
(:string
) (required)unsaved_changes
(:boolean
) - Whether the filter is newly applied or updated and hasnt been saved. Defaults tofalse
.filter_key
(:string
) (required) - A unique identifier for the filter.selected
(:boolean
) - Whether the filter is selected or not. Defaults tofalse
.initial_active
(:boolean
) - Whether the Popover will be initially open or not. Defaults tofalse
.hide_clear_button
(:boolean
) - Defaults tofalse
.disabled
(:boolean
) - Whether filtering is disabled. Defaults tofalse
.close_on_child_overlay_click
(:boolean
) - Whether the filter should close when clicking inside another Popover.on_remove
(:any
) - Callback invoked when the filter is removed. Defaults tonil
.
Slots
filter
Filters is a composite component that filters the items of a list or table.
Examples
</.skeleton_display_text>
See
- https://polaris.shopify.com/components/selection-and-input/filters
- https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Filters/Filters.tsx
- https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Filters/components/FiltersBar/FiltersBar.tsx
- https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Filters/components/FilterPill/FilterPill.tsx
Attributes
id
(:string
) (required)query_form
(Phoenix.HTML.Form
) - The form that controls the query field. Defaults tonil
.query_placeholder
(:string
) - Placeholder text for the query field. Defaults tonil
.focused
(:boolean
) - Whether the query field is focused. Defaults tofalse
.filters
(:list
) - Available filters added to the filter bar. Shortcut filters are pinned to the front of the bar. Defaults to[]
.on_query_change
(:any
) - Callback when the query field is changed. Defaults tonil
.on_query_clear
(:any
) - Callback when the clear button is triggered. Defaults tonil
.on_clear_all
(:any
) - Callback when the reset all button is pressed. Defaults tonil
.on_toggle_filter
(:any
) - Callback for when a filter is applied or unapplied. Defaults tonil
.on_query_blur
(:any
) - Callback when the query field is blurred. Defaults tonil
.on_query_focus
(:any
) - Callback when the query field is focused. Defaults tonil
.disabled
(:boolean
) - Disable all filters. Defaults tofalse
.hide_filters
(:boolean
) - Hide filter bar for applied filters. Defaults tofalse
.hide_query_field
(:boolean
) - Hide the query field. Defaults tofalse
.disable_query_field
(:boolean
) - Disable the query field. Defaults tofalse
.disable_filters
(:boolean
) - Disable the filters. Defaults tofalse
.borderless_query_field
(:boolean
) - Whether the text field should be borderless. Should be true when used as part of the IndexFilters component. Defaults tofalse
.loading
(:boolean
) - Whether an asyncronous task is currently being run. Defaults tofalse
.
Slots
query_bar
filter_bar
Attributes
id
(:string
) (required)filters
(:list
) - Available filters added to the filter bar. Shortcut filters are pinned to the front of the bar. Defaults to[]
.on_clear_all
(:any
) - Callback when the reset all button is pressed. Defaults tonil
.on_toggle_filter
(:any
) - Callback for when a filter is applied or unapplied. Defaults tonil
.disabled
(:boolean
) - Disable all filters. Defaults tofalse
.hide_query_field
(:boolean
) - Hide the query field. Defaults tofalse
.disable_filters
(:boolean
) - Disable the filters. Defaults tofalse
.on_add_filter_click
(:any
) - Callback when the add filter button is clicked. Defaults tonil
.close_on_child_overlay_click
(:boolean
) - Whether the filter should close when clicking inside another Popover. Defaults tofalse
.
Slots
inner_block
Attributes
id
(:string
) - Defaults tonil
.query_form
(Phoenix.HTML.Form
) - Defaults tonil
.phx_submit
(:any
) - Defaults tonil
.phx_change
(:any
) - Defaults tonil
.phx_focus
(:any
) - Defaults tonil
.phx_blur
(:any
) - Defaults tonil
.on_clear
(:any
) - Defaults tonil
.focused
(:boolean
) - Defaults tofalse
.placeholder
(:string
) - Defaults tonil
.disabled
(:boolean
) - Defaults tofalse
.borderless_query_field
(:boolean
) - Defaults tofalse
.loading
(:boolean
) - Show a loading spinner to the right of the input. Defaults tofalse
.
Slots
inner_block