RegionResize
Feature
Makes the splitter between grid sections draggable, to let users resize, and collapse/expand the sections.
targetElement.innerHTML = '<p>Drag the splitter between grid regions to resize</p>'; const grid = new Grid({ appendTo : targetElement, // makes grid as high as it needs to be to fit rows autoHeight : true, features : { // enabled region resize regionResize : true }, data : DataGenerator.generateData(5), columns : [ { field : 'firstName', text : 'First name', width : 150, locked : true }, { field : 'surName', text : 'Surname', width : 150, locked : true }, { field : 'city', text : 'City', flex : 1 }, { field : 'team', text : 'Team', flex : 1 }, { field : 'score', text : 'Score', flex : 1 }, { field : 'rank', text : 'Rank', flex : 1 } ] }); // enable RegionResize
const grid = new Grid({
features: {
regionResize: true
}
});
If you use two regions, and you would like to prevent resizing/expanding the first (left section, rightmost in RTL), set maxWidth and width to the same value.
// enable RegionResize
const grid = new Grid({
features: {
regionResize: true
},
subGridConfigs : {
locked : {
width : 400,
// prevent making the left section wider than 400px
maxWidth : 400
},
normal : {
flex : 1
}
}
});
This feature is disabled by default.
See also
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Deprecated:
7.0.0 Deprecated
animateCollapseExpand. Usegrid.transition.toggleRegioninsteadSet to
falseto not use transitions when expanding or collapsing a sub gridHas a corresponding runtime animateCollapseExpand property.
-
This flag prevents dragging if set to
falsebut the collapse / expand buttons will still be functional.Has a corresponding runtime enableDragging property.
-
Set to
falseto hide the splitter's collapse/expand buttonsHas a corresponding runtime showSplitterButtons property.
-
Internal listeners, that cannot be removed by the user.
-
The widget which this plugin is to attach to.
Has a corresponding runtime client property.
-
Set to
falseto disable localization of this object.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of Events class, or subclass thereof.
-
Identifies an object as an instance of Localizable class, or subclass thereof.
-
Identifies an object as an instance of RegionResize class, or subclass thereof.
-
A class property getter for the default values of internal properties for this class.
-
Deprecated:
7.0.0 Deprecated
animateCollapseExpand. Usegrid.transition.toggleRegioninsteadSet to
falseto not use transitions when expanding or collapsing a sub gridHas a corresponding animateCollapseExpand config.
-
This flag prevents dragging if set to
falsebut the collapse / expand buttons will still be functional.Has a corresponding enableDragging config.
-
Set to
falseto hide the splitter's collapse/expand buttonsHas a corresponding showSplitterButtons config.
-
An empty array that can be used as a default value.
-
An empty object that can be used as a default value.
-
Identifies an object as an instance of InstancePlugin class, or subclass thereof.
-
Identifies an object as an instance of RegionResize class, or subclass thereof.
-
Returns a copy of the full configuration which was used to configure this object.
-
This property is set to
truebefore theconstructorreturns. -
This property is set to
trueon entry to the destroy method. It remains on the objects after returning fromdestroy(). If isDestroyed istrue, this property will also betrue, so there is no need to test for both (for example,comp.isDestroying || comp.isDestroyed). -
The Widget which was passed into the constructor, which is the Widget we are providing extra services for.
Has a corresponding client config.
-
Get the global LocaleHelper
-
Get the global LocaleManager
Functions
Functions are methods available for calling on the class-
This optional class method is called when a class is mixed in using the mixin() method.
-
Registers this class type with its Factory
-
Internal function used to hook destroy() calls when using thisObj
-
Internal function used restore hooked destroy() calls when using thisObj
-
Auto detaches listeners registered from start, if set as detachable
-
Internal function used to run a callback function after an event is triggered
-
Removes all listeners registered to this object by the application.
-
This will merge a feature's (subclass of InstancePlugin) keyMap with it's client's keyMap.
Events
Events are triggered for certain actions in this class and can be listened for to react to those actions in your codeEvent handlers
Event handlers are callbacks called as a result of certain actions in this classCSS variables
CSS variables that can be set to adjust appearance| Name | Description | |
|---|---|---|
| --b-grid-splitter-zindex | Splitter z-index | |
| --b-region-resize-button-color | Color for the expand / collapse buttons showed on hover | |
| --b-region-resize-splitter-color | Splitter color | |
| --b-region-resize-splitter-width | Splitter width | |
| Collapsed | ||
| --b-region-resize-splitter-collapsed-width | Splitter width when collapsed | |
| Hovered | ||
| --b-region-resize-button-hover-color | Color for the expand / collapse buttons showed on hover | |
| --b-region-resize-splitter-hover-color | Splitter color when hovered | |
| --b-region-resize-splitter-width-hover | Splitter width when hovering (also used as the invisible interactable area width) | |
| Touched | ||
| --b-region-resize-splitter-touch-width-hover | Splitter width when touched (also used as the invisible touch area width) | |