Skip to main content

setColumnConfigDefaults

Function setColumnConfigDefaults 

Source
pub fn setColumnConfigDefaults(
    defaults: JsConfigDefaults,
    options: Option<JsColumnConfigDefaultsOptions>,
) -> ApiResult<()>
Expand description

Merge defaults into the columns_config defaults every <perspective-viewer> on the page applies, where a null value removes a default and a null defaults clears the slot.

§Arguments

  • defaults - Values keyed like one columns_config entry, or null.
  • options.plugin - Limits the defaults to the named plugin.
  • options.type - Limits the defaults to columns of this view type.

§JavaScript Examples

customElements
    .get("perspective-viewer")
    .setColumnConfigDefaults({date_format: {timeZone: "UTC"}}, {type: "datetime"});