New to Kendo UI for VueStart a free 30-day trial

Stores nested settings and notifies an (optional) observer of changes.

Definition

Package:@progress/kendo-drawing

Syntax:

ts
import { OptionsStore } from '@progress/kendo-drawing';

const options = new OptionsStore({
  foo: {
    bar: true
  }
});

Properties

An optional observer for the options store. Upon field modification, the optionsChange(e) method on the observer will be called and will provide information for the change.

Methods

Gets the value of the specified option.

Parameters:fieldstring

The field name to retrieve. Has to be a fully qualified name for nested options. For example, "foo.bar".

Returns:

any

  • The current option value.
Example:
ts
import { OptionsStore } from '@progress/kendo-drawing';

const options = new OptionsStore({
  foo: {
    bar: true
  }
});

// The bar variable will be set to true by any of these statements:
const bar = options.get("foo.bar");
const bar = options.foo.get("bar");
const bar = options.foo.bar;

Sets the value of the specified option.

Parameters:fieldstring

The name of the option to set. Has to be a fully qualified name for nested options. For example, "foo.bar".

valueany

The new option value. If the new value is the same as the old value, the operation will not notify the observer, if any.

Example:
ts
import { OptionsStore } from '@progress/kendo-drawing';

const options = new OptionsStore({
  foo: {
    bar: true
  }
});

// The foo.bar setting will be set to false by any of these statements:
options.set("foo.bar", false);
options.foo.set("bar", false);

// The following statement will succeed,
// but will not trigger optionsChange on the observer, if any.
options.foo.bar = false;
In this article
DefinitionPropertiesobserverMethodsgetset
Not finding the help you need?
Contact Support