SelectoComponents.State (selecto_components v0.3.12)
State management for SelectoComponents.
Handles state transitions, validation, and state updates for the form components without concern for UI rendering or routing logic.
Link to this section Summary
Functions
Clears the execution error from the state.
Initializes the default state for a SelectoComponents form.
Updates the active tab in the state.
Sets an execution error in the state.
Updates query results in the state.
Updates the selecto configuration in the state.
Validates and updates the view configuration.
Link to this section Functions
clear_execution_error(state)
Clears the execution error from the state.
init_state(selecto, views, opts \\ [])
Initializes the default state for a SelectoComponents form.
set_active_tab(state, tab)
Updates the active tab in the state.
set_execution_error(state, error)
Sets an execution error in the state.
set_query_results(state, results)
Updates query results in the state.
update_selecto(state, selecto)
Updates the selecto configuration in the state.
update_view_config(state, params)
Validates and updates the view configuration.