Skip to content

Releases: nhn/tui.grid

v4.15.1

18 Sep 07:10
Compare
Choose a tag to compare

Bugfixes

  • Fixed that script error is triggered when clicking the svg custom cell.(#1173)
  • null, undefined original value should be kept in editor.(#1174)

v4.15.0

20 Aug 04:59
Compare
Choose a tag to compare

Features

  • Resize column width automatically with width: 'auto' option as text length.(#1148)
    const columns = [{
      name: 'name',
      width: 'auto',
      // ...
    }];
    2020-08-18 12-23-21 2020-08-18 12_23_36
  • Added beforeChange and afterChange 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 = '';
        }
      });
    });

Bugfixes

  • Fixed that null or undefined cell value is changed to empty string in validatorfn.(#1141)
  • Fixed that previous editing value is copied when editingEvent option is click (#1143)

v4.14.0

26 Jun 02:26
Compare
Choose a tag to compare

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  },
         // ...
       ]
     })
  • 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 } },
          // ...
       ]
     });
  • 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. The errorInfo 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

v4.13.0

25 May 10:48
Compare
Choose a tag to compare

Features

  • Added beforePageMove, afterPageMove custom event (#1063)

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 to CellValue type definition.(#1054)
  • Fixed script error on calling removeCheckedrows API.(#1052)

CDN

v4.12.1

18 May 03:29
Compare
Choose a tag to compare

Bugfixes

  • Fixed that it's impossible to remove column filter state on calling resetData API option.(#1049)

CDN

v4.12.0

18 May 00:30
Compare
Choose a tag to compare

Features

  • Added beforeSort, afterSort, beforeUnsort, afterUnsort custom event.(#1046)
  • Added beforeFilter, afterFilter, beforeUnfilter, afterUnfilter custom event.(#1047)
  • 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

CDN

v4.11.0

07 May 06:51
Compare
Choose a tag to compare

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

v4.10.1

23 Mar 03:25
Compare
Choose a tag to compare

Breaking Changes

  • Changed type definition structure.(#932)
    • types folder which has all type definition is deployed.

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)
    images

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

  • Added new tutorials
    • infinite scroll(kor)
    • dataSource-ajax(kor)

CDN

v4.10.0

18 Feb 03:25
Compare
Choose a tag to compare

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'
          }
        });
    • 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'
          }
        });
    • 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);
          });
        });

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
            }
          ]
          // ...
       });
  • Removed unnecessary re-rendering of the cell when occurs mouseover event.(#913)

CDN

v4.9.1

06 Feb 02:01
Compare
Choose a tag to compare

Enhancement

  • Added nextValue, prevValue parameter to onBeforeChange, 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 })

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