@revolist/revogrid / Components / RevoGrid
Interface: RevoGrid
Revogrid - High-performance, customizable grid library for managing large datasets.
TIP
Read type definition file for the full interface information. All complex property types such as ColumnRegular
, ColumnProp
, ColumnDataSchemaModel
can be found there.
INFO
For a comprehensive events guide, check the Events. All events propagate to the root level of the grid. Dependency tree.
Examples
ts
data-rgCol-rgRow - main data slot. Applies extra elements in <revogr-data />.
ts
focus-rgCol-rgRow - focus layer for main data. Applies extra elements in <revogr-focus />.
Properties
Property | Type | Description | Defined in |
---|---|---|---|
accessible | boolean | Enable accessibility. If disabled, the grid will not be accessible. Default true | src/components.d.ts:57 |
addTrimmed | (trimmed : Record <number , boolean >, trimmedType ?: string , type ?: DimensionRows ) => Promise <CustomEvent <{ trimmed : Record <number , boolean >; trimmedType : string ; type : string ; }>> | Add trimmed by type | src/components.d.ts:61 |
additionalData | any | Additional data to be passed to plugins, renders or editors. For example if you need to pass Vue component instance. | src/components.d.ts:65 |
applyOnClose | boolean | Apply changes in editor when closed except 'Escape' cases. If custom editor in use method getValue required. Check interfaces.d.ts EditorBase for more info. | src/components.d.ts:69 |
autoSizeColumn | boolean | AutoSizeColumnConfig | Autosize config. Enables columns autoSize. For more details check autoSizeColumn plugin. By default disabled, hence operation is not performance efficient. true to enable with default params (double header separator click for autosize). Or define config. See AutoSizeColumnConfig for more details. | src/components.d.ts:73 |
canFocus | boolean | When true cell focus appear. | src/components.d.ts:77 |
canMoveColumns | boolean | Enable column move plugin. | src/components.d.ts:81 |
clearFocus | () => Promise <void > | Clear current grid focus. Grid has no longer focus on it. | src/components.d.ts:85 |
clearSorting | () => Promise <void > | Clears column sorting | src/components.d.ts:89 |
colSize | number | Indicates default column size. | src/components.d.ts:93 |
columnTypes | {} | Column Types Format. Every type represent multiple column properties. Types will be merged but can be replaced with column properties. Types were made as separate objects to be reusable per multiple columns. | src/components.d.ts:97 |
columns | (ColumnRegular | ColumnGrouping )[] | Columns - defines an array of grid columns. Can be column or grouped column. | src/components.d.ts:101 |
disableVirtualX | boolean | Disable lazy rendering mode for the X axis . Use when not many columns present and you don't need rerenader cells during scroll. Can be used for initial rendering performance improvement. | src/components.d.ts:105 |
disableVirtualY | boolean | Disable lazy rendering mode for the Y axis . Use when not many rows present and you don't need rerenader cells during scroll. Can be used for initial rendering performance improvement. | src/components.d.ts:109 |
editors | Editors | Custom editors register. | src/components.d.ts:113 |
exporting | boolean | Enable export plugin. | src/components.d.ts:117 |
filter | boolean | ColumnFilterConfig | Enables filter plugin. Can be boolean. Or can be filter collection See FilterCollection for more info. | src/components.d.ts:121 |
focusTemplate | FocusTemplateFunc | Apply changes typed in editor on editor close except Escape cases. If custom editor in use method getValue required. Check interfaces.d.ts EditorBase for more info. | src/components.d.ts:125 |
frameSize | number | Defines how many rows/columns should be rendered outside visible area. | src/components.d.ts:129 |
getColumnStore | (type ?: DimensionCols ) => Promise <Observable <DSourceState <ColumnRegular , DimensionCols >>> | Provides access to column internal store observer Can be used for plugin support | src/components.d.ts:134 |
getColumns | () => Promise <ColumnRegular []> | Receive all columns in data source | src/components.d.ts:138 |
getContentSize | () => Promise <Cell > | Get size of content Including all pinned data | src/components.d.ts:142 |
getFocused | () => Promise <null | FocusedData > | Get the currently focused cell. | src/components.d.ts:146 |
getPlugins | () => Promise <PluginBaseComponent []> | Get all active plugins instances | src/components.d.ts:150 |
getSelectedRange | () => Promise <null | RangeArea > | Get the currently selected Range. | src/components.d.ts:154 |
getSource | (type ?: DimensionRows ) => Promise <DataType []> | Get data from source | src/components.d.ts:158 |
getSourceStore | (type ?: DimensionRows ) => Promise <Observable <DSourceState <DataType , DimensionRows >>> | Provides access to rows internal store observer Can be used for plugin support | src/components.d.ts:163 |
getVisibleSource | (type ?: DimensionRows ) => Promise <any []> | Get data from visible part of source Trimmed/filtered rows will be excluded | src/components.d.ts:168 |
grouping | GroupingOptions | Group rows based on this property. Define properties to be groped by grouping plugin See GroupingOptions . | src/components.d.ts:172 |
hideAttribution | boolean | Please only hide the attribution if you are subscribed to Pro version | src/components.d.ts:176 |
jobsBeforeRender | Promise <any >[] | Prevent rendering until job is done. Can be used for initial rendering performance improvement. When several plugins require initial rendering this will prevent double initial rendering. | src/components.d.ts:180 |
pinnedBottomSource | DataType [] | Pinned bottom Source: {[T in ColumnProp]: any} - defines pinned bottom rows data source. | src/components.d.ts:184 |
pinnedTopSource | DataType [] | Pinned top Source: {[T in ColumnProp]: any} - defines pinned top rows data source. | src/components.d.ts:188 |
plugins | typeof BasePlugin [] | Custom grid plugins. Can be added or removed at runtime. Every plugin should be inherited from BasePlugin class. For more details check Plugin guide | src/components.d.ts:192 |
range | boolean | When true, user can range selection. | src/components.d.ts:196 |
readonly | boolean | When true, grid in read only mode. | src/components.d.ts:200 |
refresh | (type ?: DimensionRows | "all" ) => Promise <void > | Refreshes data viewport. Can be specific part as rgRow or pinned rgRow or 'all' by default. | src/components.d.ts:204 |
refreshExtraElements | () => Promise <void > | Refresh extra elements. Triggers re-rendering of extra elements and functions. Part of extraElements and registerVNode methods. Useful for plugins. | src/components.d.ts:208 |
registerVNode | (VNode | (c : ExtraNodeFuncConfig ) => VNode )[] | Register new virtual node inside of grid. Used for additional items creation such as plugin elements. Should be set before grid render inside of plugins. Can return VNode result of h() function or a function that returns VNode. Function can be used for performance improvement and additional renders. | src/components.d.ts:212 |
resize | boolean | When true, columns are resizable. | src/components.d.ts:219 |
rowClass | string | Row class property mapping. Map custom classes to rows from row object data. Define this property in rgRow object and this will be mapped as rgRow class. | src/components.d.ts:223 |
rowDefinitions | RowDefinition [] | Custom row properies to be applied. See RowDefinition for more info. | src/components.d.ts:227 |
rowHeaders | boolean | RowHeaders | Excel like functionality. Show row numbers. Also can be used for custom row header render if object provided. | src/components.d.ts:231 |
rowSize | number | Indicates default rgRow size. By default 0, means theme package size will be applied Alternatively you can use rowSize to reset viewport | src/components.d.ts:235 |
scrollToColumnIndex | (coordinate ?: number ) => Promise <void > | Scrolls viewport to specified column by index. | src/components.d.ts:239 |
scrollToColumnProp | (prop : ColumnProp , dimension ?: "rgCol" ) => Promise <void > | Scrolls viewport to specified column by prop | src/components.d.ts:243 |
scrollToCoordinate | (cell : Partial <Cell >) => Promise <void > | Scrolls view port to coordinate | src/components.d.ts:247 |
scrollToRow | (coordinate ?: number ) => Promise <void > | Scrolls viewport to specified row by index. | src/components.d.ts:251 |
setCellEdit | (rgRow : number , prop : ColumnProp , rowSource ?: DimensionRows ) => Promise <void > | Open editor for cell. | src/components.d.ts:255 |
setCellsFocus | (cellStart ?: Cell , cellEnd ?: Cell , colType ?: string , rowType ?: string ) => Promise <void > | Set focus range. | src/components.d.ts:259 |
setDataAt | (__namedParameters : { col : number ; row : number ; skipDataUpdate : boolean ; val : any ; } & AllDimensionType ) => Promise <undefined | void > | Refreshes data at specified cell. Useful for performance optimization. No viewport update will be triggered. Example const grid = document.querySelector('revo-grid'); grid.setDataAt({ row: 0, col: 0, val: 'test' }); // refresh | src/components.d.ts:264 |
sorting? | SortingConfig | Alternative way to set sorting. {columns: [{prop: 'name', order: 'asc'}]} | src/components.d.ts:268 |
source | DataType [] | Source - defines main data source. Can be an Object or 2 dimensional array([][]); Keys/indexes referenced from columns Prop. | src/components.d.ts:272 |
stretch | string | boolean | Stretch strategy for columns by StretchColumn plugin. For example if there are more space on the right last column size would be increased. | src/components.d.ts:276 |
theme | string | Theme name. | src/components.d.ts:280 |
trimmedRows | Record <number , boolean > | Trimmed rows. Functionality which allows to hide rows from main data set. trimmedRows are physical rgRow indexes to hide. | src/components.d.ts:284 |
updateColumnSorting | (column : ColumnRegular , index : number , order : undefined | "asc" | "desc" , additive : boolean ) => Promise <ColumnRegular > | Update column sorting | src/components.d.ts:292 |
updateColumns | (cols : ColumnRegular []) => Promise <void > | Update columns | src/components.d.ts:296 |
useClipboard | boolean | When true enable clipboard. | src/components.d.ts:300 |