LiveFilter.Filter (LiveFilter v0.1.8)

Copy Markdown View Source

Represents an active filter instance with a unique ID, field, operator, value, and config reference.

Summary

Functions

Creates a new Filter from a FilterConfig, using the config's default operator and nil value.

Creates a new Filter from a FilterConfig with a specific operator and value.

Types

t()

@type t() :: %LiveFilter.Filter{
  config: LiveFilter.FilterConfig.t(),
  field: atom(),
  id: String.t(),
  operator: LiveFilter.Types.operator(),
  value: LiveFilter.Types.filter_value()
}

Functions

new(config)

@spec new(LiveFilter.FilterConfig.t()) :: t()

Creates a new Filter from a FilterConfig, using the config's default operator and nil value.

new(config, operator, value)

Creates a new Filter from a FilterConfig with a specific operator and value.