Skip to content

Releases: komarovalexander/ka-table

Add IsNotEqual filter operator to the Filter Row

26 Sep 14:40
c6f6a01
Compare
Choose a tag to compare

add ability to set not equal filter row operator for the column:
filterRowOperator: '!='

Add isDraggable to disable Drag&Drop for specific column

26 Sep 14:02
8f95ee2
Compare
Choose a tag to compare

#442

  <Table 
     //....
     columns={[{
       //...
       isDraggable: false, // disable drag & drop for specific column
     }]}
   />

Rows alternation styles (odd/even)

22 Aug 13:41
6dc8957
Compare
Choose a tag to compare

#428

use oddEvenRows to enable rows alternation styles

  <Table 
     //....
     oddEvenRows={true}
   />

Header filter: Add search bar and improve customization

20 Jun 21:40
Compare
Choose a tag to compare

PR: #368
Questions: #415 #207 #187
New features

  1. column.headerFilterSearchValue stores value for search by headerFilterValues
  2. headerFilterSearch?: (value: any, searchValue: any, rowData?: any) => boolean; - used to customize header filter search logic
  3. isHeaderFilterSearchable - enables search in header filter
  4. childComponents.filterRowCellInput has been added for customization
  5. childComponents.headerFilterPopupSearchInput has been added for customization
  6. add new action updateHeaderFilterSearchValue(columnKey: string, headerFilterSearchValue: string)

Breaking changes

  1. rename headFilterButton -> headerFilterButton
  2. rename popupContent -> headerFilterPopupContent
  3. popupContentItem has been deleted use headerFilterPopupRow instead
  4. popupContentItemText & popupContentItemCellText have been deleted, use headerFilterPopupTextCell instead

Add prevState to onDispatch

18 May 06:01
210f76f
Compare
Choose a tag to compare

prevState is useful when you need to get previous state of the table in onDispatch

const table = useTable({
    onDispatch: (action, tableProps, prevState) => {
    }
});

major version is updated as oldValue has been removed from UpdateEditorValue & UpdateCellValue as not required anymore (oldValue can be obtained from prevState)

Add cell oldValue info to build-in cell editing actions

14 May 14:12
dc80637
Compare
Choose a tag to compare

oldValue has been added to UpdateEditorValue & UpdateCellValue actions and updateEditorValue & updateCellValue action creators
#411

Performance improvement: column.dataType independent render

28 Apr 15:51
cdb2234
Compare
Choose a tag to compare

#403

new major version as convertToColumnTypes step was removed.

in previous versions convertToColumnTypes is used to check and convert all cells data to correct dataType of the column. As a result this affected performance of the whole table.

in version 9.0.0 user should check that correct dataType is set in column, for example:
'1' & 1 have different dataTypes starting from version 9.0.0. Column with value '1' - should has String dataType, 1 - should has Number dataType.

if data has a column with value '1' - and user need it to behave it as a number, then this value should be converted to Number before passing to data, and column dataType should set as Number.

Pros:
Performance of the table is increased as no additional checks and conversions.

Cons:
Users should better care about dataTypes - but in most cases it is better to have more obvious behavior instead of having hidden conversion under the hood in the table

Add customReducer support to uncontrolled mode

08 Apr 14:21
2d06994
Compare
Choose a tag to compare
    const table = useTable({
        customReducer: (nextState, action, prevState) => {
            //...
            return newState;
        }
    });
    return (
        <Table
            table={table}
         //...
         />
     );
  1. also make more ITableProps functions as generics

Generic ITableProps

28 Mar 08:27
dad181e
Compare
Choose a tag to compare

data now has specific type, and you also can setup a type in table

<Table<DataType>
  //...
  data={data} // data array has type DataType[]
    //...
    childComponents={{
        cellText: {
            content: ({ rowData }) => {
               //.. rowData has type DataType 
            }
        }
    }}
  
/>

#343

What's Changed

Full Changelog: 8.10.0...8.11.0

ClearAllFilters action

18 Mar 11:51
3f4107f
Compare
Choose a tag to compare

To clear all filters just call table.clearAllFilters(); or clearAllFilters()