Skip to content

getConfig ​

Overview ​

Builds the merged config for a model, or for one of its views, and caches it.

The build fetches model info, derives default configs from it, then merges the generic and view-specific overrides on top. A cached config or an in-flight build for the same key is returned instead of starting a new build.

Signature ​

getConfig(params)

Parameters ​

NameTypeRequiredDescription
paramsobjectyesThe model and view to build the config for.

params Properties ​

NameTypeRequiredDefaultDescription
appstringDjango app label.
modelstringModel name.
viewstringView name, such as list or update. Omit it for the view-independent config.

Returns ​

any

A promise for the built config, with a cancel method while the build is in flight. It rejects with AuthScopeInvalidatedError if the authenticated user changes during the build.

Source ​

client/lib/stores/storeModelConfig.js:719