Skip to content

v4.6.0

Compare
Choose a tag to compare
@js87zz js87zz released this 08 Oct 02:00
· 485 commits to master since this release

Features

  • 馃帄TOAST UI Grid v4.6.0 provides Filter functionality馃帄. (#676)
    • There are four built-in filters, which include text, number, select and date. The text, number, date filters can be used with 2 conditions in conjunction with the operator option. We will also provide a custom filter option in the next minor release for users who want to use their own filters.
      Below is an example of simple usage. See the tutorial for details.

    • Code

      const columns = [
        {
           name: 'name',
           minWidth: 150,
           filter: 'text'
        }
      ]
      
      // or
      const columns = [
        {
          name: 'name',
          minWidth: 150,
          filter: {
            type: 'date',
            options: {
              format: 'yyyy-mm',
              type: 'month'
            },
            operator: 'OR',
            showApplyBtn: true, // default false
            showClearBtn: true // default false
          }
         }
       ]
    • API

      • filter
        • Reflect the filter results. This occurs only if the column has a filter option.
        • Code
          grid.filter(columnName, state)
      • unfilter
        • Clear the filtering applied to the column.
        • Code
          grid.unfilter(columnName)
      • getFilterState
        • get current filter state
        • Code
          grid.getFilterState(columnName);
      • setFilter
        • Set filter on columns.
        • Code
          grid.setFilter(columnName, filterOpt);

Bugfixes

  • Changed onGridBeforeDestroyedevent naming to onGridBeforeDestroy. (#650)
  • Fixed that checkbox in rowheader is not changed on calling checkAll, uncheckAll API. (#663)
  • Added checking sortable property on calling sort, unsort API. (#680)
  • Added checking editable property on calling startEditing, finishEditing API. (#680)
  • Fixed the bug about sorting the numeric value. (#687)
  • Added checking the hidden property of column as edit the cell and sort the data. (#692)
  • Changed the paging count properly on calling setPerPage API. (#693)
  • Fixed that row hover style is not applied properly to the selection layer. (#698)
  • Fixed select the wrong selection area in client pagination. (#699)
  • Fixed numeric validation for string value. (#700)
  • Made synchronous rendering as start or finish editing. (#702)
    • because the previous editing cell should be destroyed in case of calling finishEditing, startEditing API in a row.
    • finishEditing API has been changed for undefined value parameter. As the value parameter is undefined, the editor's value is saved and finish editing.
  • Inserted the empty value for each column as append the empty row. (#707)
  • Fixed that JS error has been caused as clicked the area of grid after removing the row. (#709)

Enhancement

  • Improved the tree performance. (#665)
    • Only the expanded children rows(excluding hidden rows) are converted to observable.
    • The hidden children rows will be observable when expanded.
    • The hierarchy tree data is not flattened when the data are supposed to be observable.
  • Enhanced the test case of related resetData, setColumns API for testing more complicated cases. (#681)
  • Added datepicker icon option. (#691)
    • Code
      const columns = [
        {
          name: 'monthPicker',
          editor: {
            type: 'datePicker',
            options: {
              format: 'yyyy-MM',
              type: 'month',
              showIcon: false // default true
            }
          }
        }
      ];
  • Added tab keyMap operation and tabMode option. (#701)
    • Code
      const { el, grid } = new Grid({
        //...
        tabMode: 'moveAndEdit'
      });

Documentation