Custom
Last updated
Last updated
Many WireBootstrap components are written in TypeScript or are JavaScript libraries that provide TypeScript definition files. This often includes a structure such as an interface that defines the valid settings for configuration when binding the component.
In some instances, an implementation requires custom data be added to the configuration to be used at some point after binding.
In the example below, a Bootstrap table is bound to data in a TypeScript project and the binding attempts to set a custom attribute myProperty
on the configuration object passed to the render
method. This causes a compile error as the property myProperty
is not a valid property on the component's configuration interface.
To set custom data on the configuration for any WireBootstrap component, use the custom
property on the configuration object. This value can be set to any valid JavaScript object.