GridMixin
A mixin providing common grid functionality.
Inheritors
Properties
String used to label the grid to screen reader users.
The item user has last interacted with. Turns to null after user deactivates the item by re-interacting with the currently active item.
If true, the grid's height is defined by its rows.
A function that allows generating CSS part names for grid cells in Shadow DOM based on their row and column, for styling from outside using the ::part() selector.
Allows you to choose between modes for rendering columns in the grid:
Set to true to allow column reordering.
Function that provides items lazily. Receives arguments params, callback
An array containing references to items with open row details.
A function that filters dragging of specific grid rows. The return value should be false if dragging of the row should be disabled.
A function that filters dropping on specific grid rows. The return value should be false if dropping on the row should be disabled.
An array that contains the expanded items.
A function to check whether a specific item in the grid may be selected or deselected by the user. Used by the selection column to conditionally enable to disable checkboxes for individual items. This function does not prevent programmatic selection/deselection of items. Changing the function does not modify the currently selected items.
Path to an item sub-property that indicates whether the item has child items.
Path to an item sub-property that identifies the item.
When true, Shift-clicking an unsorted column's sorter adds it to the multi-sort. Shift + Space does the same action via keyboard. This property has precedence over the multiSort property. If multiSortOnShiftClick is true, the multiSort property is effectively ignored.
Controls how columns are added to the sort order when using multi-sort. The sort order is visually indicated by numbers in grid sorters placed in column headers.
Custom function for rendering the content of the row details. Receives three arguments:
Marks the grid's rows to be available for dragging.
An array that contains the selected items.
Functions
Clears the cached pages and reloads data from dataprovider when needed.
Close the details row of a given item.
Collapses the given item tree.
Deselects the given item if it is already selected.
Expands the given item tree.
Runs the dragFilter and dropFilter hooks for the visible cells. If the filter depends on varying conditions, you may need to call this function manually in order to update the draggability when the conditions change.
Runs the cellPartNameGenerator for the visible cells. If the generator depends on varying conditions, you need to call this function manually in order to update the styles when the conditions change.
Returns an object with context information about the event target:
Open the details row of a given item.
Updates the width of all columns which have autoWidth set to true.
Requests an update for the content of cells.
Scrolls horizontally so that the column becomes visible in the viewport.
Scroll to a specific row index in the virtual list. Note that the row index is not always the same for any particular item. For example, sorting or filtering items can affect the row index related to an item.
Selects the given item.
Sets the default multi-sort priority to use for all grid instances. This method should be called before creating any grid instances. Changing this setting does not affect the default for existing grids.