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

Link to this function

clear_execution_error(state)

Clears the execution error from the state.

Link to this function

init_state(selecto, views, opts \\ [])

Initializes the default state for a SelectoComponents form.

Link to this function

set_active_tab(state, tab)

Updates the active tab in the state.

Link to this function

set_execution_error(state, error)

Sets an execution error in the state.

Link to this function

set_query_results(state, results)

Updates query results in the state.

Link to this function

update_selecto(state, selecto)

Updates the selecto configuration in the state.

Link to this function

update_view_config(state, params)

Validates and updates the view configuration.