Releases: komarovalexander/ka-table
Add dynamic page size selection (paging.pageSizes option)
new childComponents:
- headRow
- paging
- pagingSize
- pagingSizes
new option
paging.pageSizes: number[]; - sets available values for pageSize selector
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
- columnResizing is a common option for all columns (no need to set isResizable to each column).
- headCellResize was added to childComponents to give more customization abilities
Add focused property and navigation actions
Demo: https://komarovalexander.github.io/ka-table/#/keyboard-navigation
what's new:
- 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;
}
- 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
})
cellEditorInput
was added tochildComponents
, to customize editor input behavior
Add getSelectedData method
Obtains selected data for table according to current props
Demo: https://komarovalexander.github.io/ka-table/#/selection-single
Add singleAction option
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
#104
customization can be easily done using sass variables only:
Demo: https://komarovalexander.github.io/ka-table/#/custom-theme
Docs: http://ka-table.com/docs_ui.html#themes
Decrease ka-table package size and fix row customization
after compilation modification package size decreased 25% less
before:
version increased to 6.0.0 because of small breaking change:
- 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
const tablePropsInit: ITableProps = {
columns: [
{
key: 'column1',
visible: false // hidden column
},
],
//...
};
Demo: https://komarovalexander.github.io/ka-table/#/column-settings
Add more Sorting modes
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
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