Search
69 results 11-20
Reference
keys.clipboard
› Enable / disable clipboard interaction with KeyTableactive on the table (keys.editor) Editor will be activatedkeys.className
› Set the class name used for the focused cellAllowing the end user to visually identify which cell has focus is obviously fundamentally important to KeyTable's abilities, and this is done by adding a class to the focused cell. This class can then be styled using CSS to visually highlight the cell. The CSS outline property is useful for this, and is the styling option used by the KeyTable default stylesheet. This property can be used to alter the class name used to show cell focus.keys.blurable
› Allow KeyTable's focus to be blurred (removed) from a tablecan be automatically using keys.focus) focus cannot be removedkeys.move()
› Move the focus to an adjacent cellThis method can be used to access KeyTable's internal logic to move the focus of a cell to an adjacent cell, taking into account paging, filtering, ordering, server-side processing, etc. Note that if you know the cell (by node or index) you want to move the focus to use cell().focus().keys.enabled()
› Determine the KeyTable enabled state for a tableDataTable, as controlled by keys.enable() and keys.disable(). The values that thekeys.enable()
› Enable or disable KeyTable's interactions (mouse and keyboard)KeyTable is typically used as an enabler for other interaction options with a DataTable, such as editing a cell's content or triggering an action that will display additional information about a cell or row. In such circumstances it is important that we have the ability to control KeyTable's own listeners so which keystrokes it acts upon can be finely controls as required by your situation. This method provides that ability. When fully enabled KeyTable, when a cell has focus, will listen for all non-special character key presses (i.e. shift, cmd / ctrl and alt are ignored) and trigger the key event. However, you may wish to stop KeyTable from listening for certain events, such as letters while editing a field. To provide this ability the method accepts an optional parameter that will inform KeyTable what level of listeners you would like it to listen for and act upon. Please note that KeyTable's key listener is triggered on the keydown event and if KeyTable performs an action on the key (move focus for example) it will automatically call the stopPropagation() method of the event.keys.disable()
› Disable KeyTable's interactions (mouse and keyboard)This is what the keys.editor option provides built into
Examples
- Select › Keyboard navigation and selectiontab or the arrow keys, similar to what you
- Buttons › Keyboard activationKeyboard navigation is essential for fast navigation of a table operations and also for good accessibility. Buttons provides the ability to give each button a key binding - i.e. a key combination that when pressed will activate the button's action. The key binding can be given as a single character if you wish to listen for an unmodified key press, or as an object if you wish it to only be activated when a modifier key such as shift, alt, etc, is pressed. Only when there is no element on the page that has focus will Buttons act on a key press. This means that if you search for (for example) 1 in the DataTables search box, it will not activate Button 1 in this example. Having said that, adding a modifier key, such as shift or alt can often be useful to prevent accidental triggering of a button. This example shows two buttons; the first will be activated if
1
is pressed on the keyboard. The second requiresshift + 2
to be pressed.