Skip to content

storeListPreference ​

Overview ​

Store for persisting ViewList preferences (hidden columns, filters, sorting) per app/model pair. Keys in preferences are built via getAppModelDotName, usually in the form ${app}.${model}.

Signature ​

storeListPreference(pinia, hot)

Parameters ​

NameTypeRequiredDescription
piniaPinianoPinia instance to retrieve the store
hotStoreGenericnodev only hot module replacement

Returns ​

Store

Properties ​

$id ​

Id of the store. Used by map helpers.

Type: "listPreference"

Source: node_modules/.pnpm/pinia@3.0.4_typescript@5.9.3_vue@3.5.43_typescript@5.9.3_/node_modules/pinia/dist/pinia.d.ts:654

getFilters ​

Returns a function that gives a copy of the saved filters for one app and model.

Type: (state: ListPreferenceState) => (args: ListPreferenceArgs) => object

Source: client/lib/stores/storeListPreference.js:91

getHiddenColumns ​

Returns a function that gives a copy of the hidden column names for one app and model.

Type: (state: ListPreferenceState) => (args: ListPreferenceArgs) => string[]

Source: client/lib/stores/storeListPreference.js:76

getPerPage ​

Returns a function that gives the saved rows per page for one app and model.

Type: (state: ListPreferenceState) => (args: ListPreferenceArgs) => string | number

Source: client/lib/stores/storeListPreference.js:117

getPreferences ​

Returns a function that gives a copy of all saved preferences for one app and model.

Type: (state: ListPreferenceState) => (args: ListPreferenceArgs) => ListPreferenceEntry

Source: client/lib/stores/storeListPreference.js:64

getSorting ​

Returns a function that gives a copy of the saved sort fields for one app and model.

Type: (state: ListPreferenceState) => (args: ListPreferenceArgs) => string[]

Source: client/lib/stores/storeListPreference.js:104

initialized ​

Type: boolean

Source: client/lib/stores/storeListPreference.js:48

preferences ​

Type: object

Source: client/lib/stores/storeListPreference.js:54

Methods ​

  • clearFilters - Removes the saved filters for one app and model.
  • clearHiddenColumns - Removes the saved hidden columns for one app and model.
  • clearPerPage - Removes the saved rows per page for one app and model.
  • clearPreferences - Removes every saved preference for one app and model and writes the change to localStorage.
  • clearSorting - Removes the saved sorting for one app and model.
  • init - Loads saved preferences from localStorage once.
  • setFilters - Saves the filters for one app and model.
  • setHiddenColumns - Saves the hidden column names for one app and model.
  • setPerPage - Saves the rows per page for one app and model.
  • setSorting - Saves the sort fields for one app and model.

Source ​

client/lib/stores/storeListPreference.js:41