Skip to content

Releases: komarovalexander/ka-table

Add dynamic page size selection (paging.pageSizes option)

30 Jan 21:53
e70105c
Compare
Choose a tag to compare

new childComponents:

  • headRow
  • paging
  • pagingSize
  • pagingSizes

new option
paging.pageSizes: number[]; - sets available values for pageSize selector
image

Paging Demo: https://komarovalexander.github.io/ka-table/#/paging
Custom Paging Demo: https://komarovalexander.github.io/ka-table/#/custom-paging

Resizing improvements: Add columnResizing to ITableProps & headCellResize to childComponents

25 Jan 19:51
34a1a45
Compare
Choose a tag to compare
  1. columnResizing is a common option for all columns (no need to set isResizable to each column).
  2. headCellResize was added to childComponents to give more customization abilities

Add focused property and navigation actions

24 Jan 17:28
b057c29
Compare
Choose a tag to compare

#111

Demo: https://komarovalexander.github.io/ka-table/#/keyboard-navigation

what's new:

  1. new focused property
    stores information about the currently focused element. This property is metadata property - it does not perform any table update.
  props.focused = {
    cell?: Cell; // 
    cellEditorInput?: Cell;
  }
  1. new actions:
  • ActionType.ClearFocused
    action creator: clearFocused()

  • ActionType.SetFocused
    action creator: setFocused(focused)

  • ActionType.MoveFocusedDown
    action creator:

  moveFocusedDown(settings: { 
     end: boolean, // move to the last row
  })
  • ActionType.MoveFocusedUp
    action creator:
  moveFocusedUp(settings: { 
     end: boolean, // move to the first row
  })
  • ActionType.MoveFocusedLeft
    action creator:
  moveFocusedLeft(settings: { 
     end: boolean, // move to the first column
  })
  • ActionType.MoveFocusedRight
    action creator:
  moveFocusedRight(settings: { 
     end: boolean, // move to the last column
  })
  1. cellEditorInput was added to childComponents, to customize editor input behavior

Add getSelectedData method

08 Jan 21:23
e988b70
Compare
Choose a tag to compare

Obtains selected data for table according to current props
Demo: https://komarovalexander.github.io/ka-table/#/selection-single

Add singleAction option

25 Dec 18:26
fa4caa7
Compare
Choose a tag to compare

Added the ability to set action which will be executed only once after grid render

  import { loadData } from 'ka-table/actionCreators';
  
  const tableProps = {
    //....
    singleAction: loadData(),
    //....
  }

this is useful for remote data, see demos:
Remote Data -> Load
Remote Data -> Editing

Add ability to change styles using sass variables

28 Nov 21:12
2a6c24d
Compare
Choose a tag to compare

Decrease ka-table package size and fix row customization

07 Nov 19:14
e4c0c03
Compare
Choose a tag to compare

after compilation modification package size decreased 25% less
before:
image

after:
image

version increased to 6.0.0 because of small breaking change:

  1. dataRow row content was a content of td element (cell)
    now it is content of tr (row)

before

      childComponents={{
        dataRow: {
          content: (props) => <div>Content</div>,
        }
      }}

after

      childComponents={{
        dataRow: {
          content: ({columns}) => <td className='ka-cell' colSpan={columns.length}><div>Content</div></td>,
        }
      }}

Add column.visible property to show/hide column

28 Oct 08:44
294e7de
Compare
Choose a tag to compare

#94

  const tablePropsInit: ITableProps = {
    columns: [
      { 
         key: 'column1', 
         visible: false  // hidden column
      },
    ],
    //...
  };

Demo: https://komarovalexander.github.io/ka-table/#/column-settings

Add more Sorting modes

23 Oct 21:28
c4185ed
Compare
Choose a tag to compare

now it has remote modes and a 3-state single mode
demo: https://komarovalexander.github.io/ka-table/#/sorting

Add items selection according to their filter or visibility

27 Sep 07:28
49d3845
Compare
Choose a tag to compare

new action types:

  DeselectAllFilteredRows = 'DeselectAllFilteredRows',
  DeselectAllVisibleRows = 'DeselectAllVisibleRows',

  SelectAllFilteredRows = 'SelectAllFilteredRows',
  SelectAllVisibleRows = 'SelectAllVisibleRows',

new action creators:

  deselectAllFilteredRows()
  deselectAllVisibleRows();
  selectAllFilteredRows()
  selectAllVisibleRows()

new utils methods:

kaPropsUtils.areAllFilteredRowsSelected(tableProps)
kaPropsUtils.areAllVisibleRowsSelected(tableProps)

Demo: https://komarovalexander.github.io/ka-table/#/selection