🍞🔡 The Powerful Component to Display and Edit Data. Experience the Ultimate Data Transformer!
MIT License
Bot releases are hidden (Show)
Published by jajugoguma over 2 years ago
Published by jajugoguma over 2 years ago
Added feature to reset auto-sizing column widths in resetColumnWidths
.
resetColumnWidths
API without arguments.Added the feature that is instant applying of built-in editor.
instantApply
option to true
in property of options of editor of column.const grid = new tui.Grid({
columns: [
{
// ...
editor: {
type: 'select',
options: {
listItems: /* ... */,
instantApply: true
}
}
},
]
});
Published by jajugoguma over 2 years ago
Published by jajugoguma over 2 years ago
const grid = new tui.Grid({
// ...
treeColumnOptions: {
// ...
indentWidth: 50
},
// ...
});
getColumnClassNames(columnName: string): string[]
Row
getRowClassNames(rowKey: number | string): string[]
Cell
getCellClassNames(rowKey: number | string, columnName: string): string[]
In the case of a cell, the class name added to the column and row to which the cell corresponds is also returned.Published by jajugoguma almost 3 years ago
getFilteredData():
const grid = Grid({
// ...
contextMenu: null
// ...
});
const grid = new tui.Grid({
// ...
draggable: true,
// ...
});
getColumn(columnName: string): ColumnInfo | null;
disableCell(rowKey: RowKey, columnName: string): void
enableCell(rowKey: RowKey, columnName: string): void
const grid = new Grid({
// ...,
columns: [
{
header: 'Name',
name: 'name',
rowSpan: true
},
{
header: 'Artist',
name: 'artist',
rowSpan: true
}
],
// ...
});
Published by jajugoguma almost 3 years ago
Published by jajugoguma almost 3 years ago
Published by js87zz about 3 years ago
Published by js87zz about 3 years ago
Fixed wrong external dependency module(SheetJS
) name.(#1467)
exportData(format: 'csv' | 'xlsx', exportOpt?: ExportOpt)
with default context menu
with custom context menu
const grid = new tui.Grid({
//...
contextMenu: ({ rowKey, columnName }) => (
[
[
{
name: 'export',
label: 'Export',
subMenu: [
{
name: 'default',
label: 'Default',
subMenu: [
{
name: 'csvExport',
label: 'CSV export',
action: () => {
grid.export('csv');
}
},
{
name: 'excelExport',
label: 'Excel export',
action: () => {
grid.export('xlsx');
}
},
]
},
{
name: 'includeHeader',
label: 'includeHeader: false',
subMenu: [
{
name: 'csvExport',
label: 'CSV export',
action: () => {
grid.export('csv', { includeHeader: false });
}
},
{
name: 'excelExport',
label: 'Excel export',
action: () => {
grid.export('xlsx', { includeHeader: false });
}
},
]
},
{
name: 'colunmNames',
label: `['name', 'artist']`,
subMenu: [
{
name: 'csvExport',
label: 'CSV export',
action: () => {
grid.export('csv', { columnNames: ['name', 'artist'] });
}
},
{
name: 'excelExport',
label: 'Excel export',
action: () => {
grid.export('xlsx', { columnNames: ['name', 'artist'] });
}
},
]
},
{
name: 'onlySelected',
label: 'onlySelected: true',
subMenu: [
{
name: 'csvExport',
label: 'CSV export',
action: () => {
grid.export('csv', { onlySelected: true });
}
},
{
name: 'excelExport',
label: 'Excel export',
action: () => {
grid.export('xlsx', { onlySelected: true });
}
},
]
},
],
}
],
]
),
});
appendRows()
API (#1448)Published by js87zz over 3 years ago
Published by js87zz over 3 years ago
const grid =tui.Grid({
// ...
contextMenu: () => [
[
{
name: 'id1',
label: 'menu1',
action: 'copyRows',
classNames: ['my']
},
{
name: 'id2',
label: 'menu2',
action: () => {
console.log('menu2');
},
subMenu: [
{
name: 'id3',
label: 'subMenu1',
},
],
},
],
[
{
name: 'id4',
label: 'menu3',
action: () => {
console.log('menu3');
}
},
],
],
// ...
});
default context menu
keydown
custom event. (Does not occur during editing)grid.on('keydown', (ev) => { console.log(ev); });
Published by js87zz over 3 years ago
drop
event property (#1375)Published by js87zz over 3 years ago
Published by js87zz over 3 years ago
appended
property to drag
event.(#1352)Published by js87zz over 3 years ago
const grid = new Grid({
data,
// enable D&D functionality
draggable: true,
});
normal data
tree data
Custom event
draggable
option is enabled).
rowKey
: The rowKey of the row to drag.floatingRow
: The floating row DOM element.draggable
option is enabled).
rowKey
: The rowKey of the row to drag.targetRowKey
: The rowKey of the row at current dragging position.draggable
option is enabled).
rowKey
: The rowKey of the row to drag.targetRowKey
: The rowKey of the row at current dragging position.appended
: Whether the row is appended to other row as the child in tree data.moveRow
API
Although the existing moveRow
API worked only on normal data, it also works on tree data after v4.17.0
.
// This option for only tree data. Whether the row is appended to other row as the child.
interface OptMoveRow {
appended?: boolean
}
public moveRow(rowKey: RowKey, targetIndex: number, options: OptMoveRow): void;
The tutorial for D&D functionality will be added soon :)
setPerPage
API option to send additional parameters. Thanks to @LEE-YANG-JAE.(#1249)public setPerPage(perPage: number, data?: Params) {
// ...
}
oneTimeBindingProps
in react wrapper. Thanks to @juliencampion .(#1263)scroll-x
.(#1312)max-height
to select box, check box editor for convenience of the user.(#1322)listItemText
formatter option.(#1326)window.innerWidth
is smaller than the left position of the filter layer.(#1327)Published by js87zz almost 4 years ago
styles
, attributes
, classNames
for default renderer. Users can configure styles
, attributes
, classNames
options to apply some styles or attributes in default renderer.(#1242)const columns = [
{
name: 'name',
renderer: {
styles: {
fontWeight: '500',
},
attributes: {
myCustom: 'my-custom',
title: (props: CellRendererProps) => `my ${props.value}`,
},
classNames: ['my-class'],
},
},
];
const grid = new Grid({
columns,
// ...
})
tutorial(ko): https://github.com/nhn/tui.grid/blob/master/packages/toast-ui.grid/docs/ko/custom-renderer.md
tutorial(en): https://github.com/nhn/tui.grid/blob/master/packages/toast-ui.grid/docs/en/custom-renderer.md
Published by js87zz almost 4 years ago
check
, uncheck
API through using async batch.(#1226)restore
API with tree data.(#1224)scrollEnd
event has been triggered when calling clear
API.(#1227)Published by js87zz almost 4 years ago
getvalue
API to return falsy value properly.(#1207)