Releases: nhn/tui.grid
Releases · nhn/tui.grid
v4.15.1
v4.15.0
Features
- Resize column width automatically with
width: 'auto'
option as text length.(#1148)const columns = [{ name: 'name', width: 'auto', // ... }];
- Added
beforeChange
andafterChange
event. The event will be triggered on editing or pasting, deleting the data by keyMap. The existing column events(onBeforeChange
,onAfterChange
) will be deprecated.(#1149)grid.on('beforeChange', ev => { /** * { * origin: 'cell' | 'paste' | 'delete' * changes: [{ rowKey: 0, columnName: 'name', value: 'value', nextValue: 'nextValue', prevValue: 'prevValue' }] * } */ console.log(ev); });
- To alter specific change, overwrite the desired value to
change.nextValue
as below.
grid.on('beforeChange, ev => { ev.changes.forEach(change => { if (change.nextValue === 'needReplace') { // 'needReplace' is replaced with empty string change.nextValue = ''; } }); });
- To alter specific change, overwrite the desired value to
Bugfixes
v4.14.0
Features
-
Added custom comparator option.(#1096)
- The
comparator
option is useful to sort the data with user's own comparator. The structure of comparator is same as general compare function which run in javascript sort function. However, you can use the rowA, rowB in our comparator. These parameters is useful to sort the data using other column data.
const comparator = (valueA, valueB, rowA, rowB) => { if (valueA.length < valueB.length) { return -1; } if (valueA.length > valueB.length) { return 1; } return 0; }; const grid = new Grid({ data, columns: [ { name: 'name', header: 'name', comparator }, // ... ] })
- The
-
Added
unique
built-in validation type.(#1099)- The
unique
option is useful to check the uniqueness of the column data.
const grid = new Grid({ data, columns: [ { name: 'name', validation: { unique: true } }, // ... ] });
- The
-
Added
position
,visiblePages
pageOptions.(#950, #1097)const grid = new Grid({ data, columns, pageOptions: { useClient: true, visiblePages: 7, position: 'top' } })
-
Added more detail information to the result of validate API.(#1107)
errorInfo
is added to the result of validate API. TheerrorInfo
has more detail information on validation result and it will replace the existing errorCode which is deprecated.
// result of validate API. // errorInfo has errorCode and meta date for handling the validation result more conveniently. [ { rowKey: 1, errors: [ { columnName: 'c1', // errorCode is deprecated. errorCode: ['VALIDATOR_FN'], errorInfo: [{ errorCode: "VALIDATOR_FN", customCode: 'CUSTOM_CODE' }] } ] }, { rowKey: 2, errors: [ { columnName: 'c1', errorCode: ['MIN'], errorInfo: [{ errorCode: "MIN", min: 1000 }] } ] } ]
Enhancement
- The editing result is saved when clicking the dummy cell for usability and uniformity in grid.(#1088)
Bugfixes
- Fixed that appended row was not displayed with infinite scrolling option.(#1085)
- Fixed that
scrollEnd
event has been triggered after calling resetData API.(#1086) - Fixed script error when expanding the tree cell with resizable option.(#1087)
- Fixed that the operation has not been worked according to the defined order of relation columns.(#1089)
- Fixed that the incorrect data has been rendered when removing the row.(#1101)
CDN
- tui-grid.js: https://uicdn.toast.com/grid/v4.14.0/tui-grid.js
- tui-grid.min.js: https://uicdn.toast.com/grid/v4.14.0/tui-grid.min.js
- tui-grid.css: https://uicdn.toast.com/grid/v4.14.0/tui-grid.css
- tui-grid.min.css: https://uicdn.toast.com/grid/v4.14.0/tui-grid.min.css
v4.13.0
Features
Bugfixes
- Fixed that the tree cell couldn't be edited when appending empty tree row.(#1034)
- Improved the performance of sorting with filtering the data.(#1037)
- Fixed that the row couldn't be found by calling getRow API after calling clearModifiedData API.(#1050)
- Added
object
type toCellValue
type definition.(#1054) - Fixed script error on calling removeCheckedrows API.(#1052)
CDN
- tui-grid.js: https://uicdn.toast.com/grid/v4.13.0/tui-grid.js
- tui-grid.min.js: https://uicdn.toast.com/grid/v4.13.0/tui-grid.min.js
- tui-grid.css: https://uicdn.toast.com/grid/v4.13.0/tui-grid.css
- tui-grid.min.css: https://uicdn.toast.com/grid/v4.13.0/tui-grid.min.css
v4.12.1
Bugfixes
- Fixed that it's impossible to remove column filter state on calling
resetData
API option.(#1049)
CDN
- tui-grid.js: https://uicdn.toast.com/grid/v4.12.1/tui-grid.js
- tui-grid.min.js: https://uicdn.toast.com/grid/v4.12.1/tui-grid.min.js
- tui-grid.css: https://uicdn.toast.com/grid/v4.12.1/tui-grid.css
- tui-grid.min.css: https://uicdn.toast.com/grid/v4.12.1/tui-grid.min.css
v4.12.0
Features
- Added
beforeSort
,afterSort
,beforeUnsort
,afterUnsort
custom event.(#1046)- detail content(#1042)
- Added
beforeFilter
,afterFilter
,beforeUnfilter
,afterUnfilter
custom event.(#1047)- detail content(#1042)
- Added resetData API option for keeping the sort, filter state
Bugfixes
- The summary content has not been changed after calling
setColumns
API.(#1027) - Fixed that vertical border theme has been not applied.(#1029)
- Fixed that the scroll bar has not been displayed with empty data.(#1036)
Documentation
- Added english tutorial
- Infinite scroll
- Custom column header
- Added option for dataSource after
v4.9.0
CDN
- tui-grid.js: https://uicdn.toast.com/grid/v4.12.0/tui-grid.js
- tui-grid.min.js: https://uicdn.toast.com/grid/v4.12.0/tui-grid.min.js
- tui-grid.css: https://uicdn.toast.com/grid/v4.12.0/tui-grid.css
- tui-grid.min.css: https://uicdn.toast.com/grid/v4.12.0/tui-grid.min.css
v4.11.0
Features
- Added getFormattedValue API.(#1013)
- Return the formatted value of the cell identified by the rowKey and columnName.
- Code
const formattedValue = grid.getFormattedValue('rowKey', 'columnName');
Bugfixes
- The header checkbox will be released and the checked states of added data will be not checked in case of adding data through infinite scroll. If you want to know more detail history, refer this issue.(#973)
- Fixed that scrollEnd event was triggered when scrolling horizontally.(#983)
- Changed global scoped checkbox css.(#993)
- The validator function has been changed to be evaluated lazily for applying the latest grid data.(#994)
- Fixed editing of the tree cell is disabled.(#995)
- Fixed script error on calling setColumnValues API.(#997)
- Added missing css(
tui-grid-cell-current-row
).(#1000) - Fixed that the data removed by clear API has been registered to the modified target data.(#1006)
- Removed wrong
el
type in react-wrapper.(#1007) - Fixed wrong editing layer position with translate style.(#1010)
- Fixed the hidden column couldn't be included in target column on setValue API.(#1011)
Documentation
- Fixed the typo and broken link.(#1026)
CDN
- tui-grid.js: https://uicdn.toast.com/grid/v4.11.0/tui-grid.js
- tui-grid.min.js: https://uicdn.toast.com/grid/v4.11.0/tui-grid.min.js
- tui-grid.css: https://uicdn.toast.com/grid/v4.11.0/tui-grid.css
- tui-grid.min.css: https://uicdn.toast.com/grid/v4.11.0/tui-grid.min.css
v4.10.1
Breaking Changes
Enhancement
- Filled the missing data internally using column property.(#914)
select
,checkbox
editing UI is changed to layer UI for visibility of editing content. The editing content is not cut off in layer UI.(#928)
Bugfixes
- Fixed that duplicated event handler is registered in react wrapper.(#925)
- checked
disabled
,editable
state in setColumnValues and setValue API.(#931) - Fixed that
checked
state of header checkbox has wrong when appending or removing row.(#933) - Fixed script error with applying
rowHeight: 'auto'
option.(#939) - Fixed malfunction of moveRow API.(#955)
- The data removed using
backspace
,del
key is added to modified target.(#957) - Fixed custom validation function is called multiple times.(#960)
- Fixed wrong
checked
state of rows with infinite scrolling.(#964)
Documentation
CDN
- tui-grid.js: https://uicdn.toast.com/grid/v4.10.1/tui-grid.js
- tui-grid.min.js: https://uicdn.toast.com/grid/v4.10.1/tui-grid.min.js
- tui-grid.css: https://uicdn.toast.com/grid/v4.10.1/tui-grid.css
- tui-grid.min.css: https://uicdn.toast.com/grid/v4.10.1/tui-grid.min.css
v4.10.0
Features
- TOAST UI Grid provides infinite scroll functionality.(#909)
The data can be displayed when user scrolls at the bottommost by configuring the option. TOAST UI Grid will support that operation on three way.-
Client infinite scrolling
Users configure the whole data in grid, however, only the paginated data is displayed. The next data will be displayed when users scroll at the bottommost.- Code
const grid = new Grid({ data, columns, // bodyHeight option is mandatory bodyHeight: 300, pageOptions: { // should define the `useClient: true` option to use client infinite scrolling useClient: true, perPage: 50, // should define the 'scroll' option type: 'scroll' } });
- Code
-
Infinite scrolling using
dataSource
Users configure dataSource and also add data through dataSource in grid.- Code
const grid = new Grid({ data, columns, // bodyHeight option is mandatory bodyHeight: 300, pageOptions: { perPage: 50, // should define the 'scroll' option type: 'scroll' } });
- Code
-
Infinite scrolling using
scrollEnd
event
Users directly add the data through using scrollEnd custom event.- Code
const grid = new Grid({ data, columns, // bodyHeight option is mandatory bodyHeight: 300 }); grid.on('scrollEnd', () => { axios.get('url').then((response) => { grid.appendRows(response.data); }); });
- Code
-
Enhancement
- Added
validatorfn
parameters.(#911)- Code
const grid = new tui.Grid({ columns: [ { header: 'Price', name: 'price', validation: { // can get `columnName` and `rowKey` through `row` parameter validatorFn: (value, row, columnName) => value !== 11000 } ] // ... });
- Code
- Removed unnecessary re-rendering of the cell when occurs mouseover event.(#913)
CDN
- tui-grid.js: https://uicdn.toast.com/grid/v4.10.0/tui-grid.js
- tui-grid.min.js: https://uicdn.toast.com/grid/v4.10.0/tui-grid.min.js
- tui-grid.css: https://uicdn.toast.com/grid/v4.10.0/tui-grid.css
- tui-grid.min.css: https://uicdn.toast.com/grid/v4.10.0/tui-grid.min.css
v4.9.1
Enhancement
- Added
nextValue
,prevValue
parameter toonBeforeChange
,onAfterChange
.(#898)- Code
// `nextValue` is to be changed // `value` is existing value(not changed) onBeforeChange({ rowKey, columnName, value, nextValue }) // `prevValue` is previous value(before changed) // `value` is changed value onAfterChange({ rowKey, columnName, value, prevValue })
- Code
Bugfixes
- Changed
undefined
style property to default value(empty string) in virtual DOM for preventing to maintain old style in DOM element.(#894) - Added
enumerable
configuration to observable object to spread observable data properly.(#895)
CDN
- tui-grid.js: https://uicdn.toast.com/grid/v4.9.1/tui-grid.js
- tui-grid.min.js: https://uicdn.toast.com/grid/v4.9.1/tui-grid.min.js
- tui-grid.css: https://uicdn.toast.com/grid/v4.9.1/tui-grid.css
- tui-grid.min.css: https://uicdn.toast.com/grid/v4.9.1/tui-grid.min.css