GridFeatureManager
Static class intended to register and query grid features (also applies to Scheduler, Scheduler Pro and Gantt).
A feature for Grid, Scheduler, Scheduler Pro or Gantt must extend InstancePlugin.
Note that features for Calendar and TaskBoard differ, they should not be registered with GridFeatureManager, and they use different base classes.
Registering a custom feature
First define a new feature, extending InstancePlugin:
export default class MyFeature extends InstancePlugin {
// Class name, needed since the actual class name might be mangled by the minifier
static $name = 'MyFeature';
construct(client, config) {
// Set things up here
}
}
You can supply a construct function to set things up after the feature is plugged into the target component (Grid, Scheduler etc). Use it to for example register a click listener:
construct(client, config) {
+ EventHelper.on({
+ element : client.element,
+ thisObj : this,
+ click : this.clickCounter,
+ mouseover : this.trackMouse,
+ });
}
+ clickCounter() {}
+ trackMouse() {}
Then register it with GridFeatureManager:
GridFeatureManager.registerFeature(MyFeature);
After that it is ready to use:
const grid = new Grid({
features : {
myFeature : true
}
});
The feature name always starts with a lowercase letter
No results
Functions
Functions are methods available for calling on the class-
Resets feature registration date, used in tests to reset state after test