- Bug fix - Don't create a new component type on render to avoid issues with controlled components. #287
- Feature - Pick up
props.style.maxHeight
atVirtualized.Body
if it's set. #277
- Bug fix - Bump lodash peer dependency to v4 minimum. This was expected already, but the version was wrong.
- Bug fix - Bump lodash peer dependency to v4 minimum. This was expected already, but the version was wrong.
- Bug fix - Bump lodash peer dependency to v4 minimum. This was expected already, but the version was wrong.
- Bug fix - Bump lodash peer dependency to v4 minimum. This was expected already, but the version was wrong.
- Bug fix - Bump lodash peer dependency to v4 minimum. This was expected already, but the version was wrong.
- Bug fix - Calculate rows when height changes. #270
- Feature - Drop
deep-diff
dependency. Now it checks through lodash instead. Simpler this way. - Bug fix - Allow
rowKey
to be zero. #262
- Bug fix - Fix false negative for
rowKey
check. Now objects with getters should work as expected. #261
- Feature - Expose
onDragColumnStart
andonDragColumnEnd
ateasy.bindColumns
.
- Feature - Expose
resizable.column
onDragStart
andonDragEnd
. These work the same way asonDrag
except at the beginning and the end of the process.
- Feature - Expose
onDragColumnStart
andonDragColumnEnd
atresizableHeader
.
- Bug fix - Swap resizableHeader and sorting formatter application order to match the original.
- Bug fix - Make sure
helper
doesn't crash ifprops
are missing from a column.
- Feature - Pass
index
tohelper
getId
. The enhanced signature isgetId(column, index)
. - Bug fix - Make sure
helper
merges class names correctly if there are multiple.
- Bug fix - Drop
reactabular
peer dependency as that's not needed anymore.
- Feature - Allow
Sticky.Header
overflow
to be overridden throughstyle
.
- Feature - Allow
Sticky.Body
overflow
to be overridden throughstyle
. #246
This is a major release with plenty of improvements, but also some breakage so go through the following changes carefully. The biggest changes have to do with the column definition (formatters [<fn>]
over format: <fn>
, no support for nested columns out of the box), resolving (composes better), and reactabular-easy
partitioning (better API for the future).
reactabular
wrapper package has been dropped. As a result no standalone builds are available anymore. This has to do with the fact that the project has been split up into smaller parts that maintaining one didn't make any sense.
This means that in order to use the basic table without any bells and whistles you will have to import * as Table from 'reactabular-table';
over import { Table } from 'reactabular';
The following packages have been moved to standalone projects:
reactabular-search
is searchtabular now.reactabular-tree
is treetabular now.reactabular-resolve
is table-resolver now.reactabular-highlight
has been integrated tosearchtabular
. You getsearch.highlighter
,search.highlightCell
, andsearch.highlightValue
now.reactabular-search-columns
has been integrated tosearchtabular
. You can access it throughsearch.Columns
.reactabular-search-field
has been integrated tosearchtabular
. You can access it throughsearch.Field
.reactabular-sort
is sortabular now.reactabular-select
was integrated into selectabular. You can access it throughimport { byArrowKeys } from 'selectabular';
.react-edit
is functionally the same as before except it is in a repository of its own. This makes it possible to keep its versioning out of sync with the rest as it moves slower.reactabular-visibility-toggles
has been pushed to react-visibility-toggles with several improvements and full test coverage.
reactabular-utils
doesn't exist anymore as the functionality has been split up into reactabular-table
and table-resolver
.
Reactabular doesn't support nested column definitions out of the box anymore. Earlier they did, but the logic didn't. To fix this, the related resolving pass was moved outside of the core. Even though it's more code, now all the logic (search/sorting/...) works with nested definitions and you have control over naming and the conventions you prefer.
- Breaking -
resizableColumn
isn't included in the core distribution anymore. You should usereactabular-resizable
instead. - Breaking - Official support for lodash 3 has been dropped.
- Feature - Expose
dnd.draggableRow
. This allows you to use row dragging with virtualization. Example:body.row = dnd.draggableRow(Virtualized.BodyRow)
. - Feature -
dnd.draggableRow
hooks into row level (onRow({ rowId })
) propsonCanMove({ rowId })
,onMoveStart({ rowId })
,onMove({ sourceRowId, targetRowId })
, andonMoveEnd({ rowId })
instead of justonMove
. - Feature - Fail fas if
moveLabels
is missing data. - Feature - Expose
move
core algorithm. This can be useful standalone.
- Feature - Support row dragging. This has been exposed through
onMoveRow({ sourceRowId, targetRowId })
. You are expected to call an algorithm that actually moves the row there.reactabular-dnd
implements these. Note that this works only while there is no sorting or search query in place! - Bug fix - Inject
className
per row only if it has been defined atonRow
. - Bug fix - If a column has width set, set
maxWidth
to it as well. #238 - Breaking - The API has been partitioned so that the column definition related functionality is bound separately. This makes it possible to implement nested column functionality on top of it. Consider the example below and see the README for more:
...
render() {
...
const newColumns = easy.bindColumns({
toggleChildrenProps: { className: 'toggle-children' },
sortingColumns,
rows,
idField,
parentField,
props: this.props,
// Handlers
onMoveColumns: this.onMoveColumns,
onSort: this.onSort,
onDragColumn: this.onDragColumn,
onToggleShowingChildren: this.onToggleShowingChildren
})(columns);
...
}
...
- Feature - Pass whole column through header/body for extra parameters.
- Feature - Support
onRow
atTable.Header
. - Feature - Allow
Table.Header
to acceptheaderRows
(an array of column definitions) to override default columns. See below. - Feature - Move
utils.resolveRowKey
,utils.evaluateFormatters
,utils.evaluateTransforms
,utils.mergeProps
,utils.columnsAreEqual
toreactabular-table
. - Bug fix - Skip functions at
BodyRow
shouldComponentUpdate
. - Breaking - Generalize
format: <fn>
asformatters: [<fn>]
. The formatters are applied recursively from left to right:[f1, f2, f3] => f1(f2(f3(value, extra)))
. This allows composition. - Breaking - Extract nested column logic. Now you will have to resolve nested columns before passing them to the table. The advantage of doing this is that now all logic (search/sorting/etc.) works with nested tables. Basic idea:
import { resolve } from 'reactabular';
// or
// import * as resolve from 'table-resolver';
...
const NestedColumnsTable = () => {
const resolvedColumns = resolve.columnChildren({ columns });
const resolvedRows = resolve.resolve({
columns: resolvedColumns,
method: resolve.nested
})(rows);
return (
<Table.Provider columns={resolvedColumns}>
<Table.Header
headerRows={resolve.headerRows({ columns })}
/>
<Table.Body
rows={resolvedRows}
rowKey="id"
/>
</Table.Provider>
);
};
...
- Feature - Allow
minWidth
to be set percolumn
explicitly. - Breaking - Push performance optimized resizing to a function. As a result
reactabular-resizable
exposescolumn
andhelper
functions now.column
is the same as before.helper
implements optional performance optimizations. See the README for usage instructions.
- Bug fix - Improve horizontal scrolling performance when used with reactabular-sticky. If it detects Y didn't change while scrolling, it skips rendering now.
- Bug fix - Skip functions at
BodyRow
shouldComponentUpdate
. - Breaking - Speed up vertical scrolling by implementing
shouldComponentUpdate
for rows. Now it detects whether or not a row has been measured and also does check based on column and row changes like default SCU at reactabular-table.
- New package to wrap common configuration.
- Breaking - Rework
moveRows
interface. Instead ofmoveRows(rows, { sourceRowId, targetRowId }) => rows
it'smoveRows({ rows, sourceRowId, targetRowId }) => rows
now.
- Bug fix - Pass
parentField
totree.filter
. Now toggling should work. - Breaking - Push
onMoveColumns
behavior out of table core. Now it doesn't maintain table state at all. As a result you need to implementonMoveColumns
handler like this to make column moving work:
onMoveColumns({ columns, source, target }) {
this.setState({ columns });
}
- Breaking - Push logic to selectabular. See the selection demo (features -> selecting rows) for the new, more powerful API.
- Bug fix - Allow
tree.toggleChildren
to work without columnprops
defined. - Feature - Add
tree.getImmediateChildren
. - Feature - Add
tree.moveRows
. - Breaking - Refactor
tree.filter
as({ fieldName, parentField = 'parent' }) => (rows) => filteredRows
.
- Bug fix - If
rowKey
value is zero,resolveRowKey
should return0-row
. - Feature - Allow
colSpan
androwSpan
to be overridden atresolveHeaderRows
.
- Bug fix - Fix
onRow
behavior (match interface withreactabular-table
). #229
- Bug fix - Return
false
ifproperty
is not defined. #228
- Bug fix - Allow
tree.filter
parent
to be zero.
- Bug fix - Make sure
idField
prop
works correctly.tree.sort
needed to receiveidField
for the logic to work.
- Feature - Allow
idField
to be passed totree.sort
.
- Bug fix - Bump peer version ranges to avoid npm warnings.
- Bug fix - Bump peer version ranges to avoid npm warnings.
- Bug fix - Bump peer version ranges to avoid npm warnings.
- Feature - Add an example showing how to access
scrollTo
.
- Breaking - Expose
idField
andparentField
props
for customizing tree field types. EarlierrowKey
handledidField
but now it has been separated for clarity. - Breaking - Drop
styles
prop. Useprops
instead.
- Breaking -
search.multipleColumns
andsearch.singleColumn
now accept acastingStrategy
parameter to define how to cast properties when searching. By default, everything by arrays is cast to a string. - Feature -
search.matches
now traverses arrays and returns results in the same shape.
- Bug fix - Make toggling behavior rely on
property
overid
. Now the behavior is more consistent with filtered sets. #216 - Bug fix - If
column.property
is not set, generate key based on column index instead.
- Breaking - Drop
styles
prop. Useprops
instead.
- Breaking - Drop
styles
prop. Useprops
instead.
- Feature - Allow table body and body row
shouldComponentUpdate
to be overridden.
- Breaking - Merge
tree.flatten
withtree.unpack
. The new signature fortree.unpack
istree.unpack = ({ parentField = 'parent', parent, idField = 'id'}) => (rows) => <unpackedRows>
. - Breaking - Rework API so that all functions except
tree.toggleChildren
work in curry format ((...) => (rows) => <new rows>
). This way the API is consistent and easy to extend. - Breaking - Expose
childrenField
fortree.pack
andtree.unpack
. It defaults tochildren
. - Breaking - Make
tree.pack
to work in a recursive manner (packs children within children). - Breaking - Make
tree.search
match against children as well. If children as matched, it will return parents as well. - Feature - Add
tree.getChildren
utilities for getting node children.
- Feature - Add
scrollTo(index)
method toVirtualized.Body
ref
.
- Feature - Expose
props
prop for customizingprops
of the component. This will replacestyles
eventually.
- Feature - Expose
props
prop for customizingprops
of the component. This will replacestyles
eventually.
- Feature - Expose
props
prop for customizingsort.header
props
of the component. This will replacestyles
eventually.
- Bug fix - If
className
is not provided totree.toggleChildren
, do not renderundefined
as a class. Also dropped extraconsole.log
.
- Bug fix - Calculate
tree.getParents
correctly for root level nodes without parents. Previously that gave false positives. - Feature - Annotate
tree.toggleChildren
withhas-children
andhas-parent
classes. Easier to style this way.
- Feature - Add
tree.flatten
to allow transforming a nested tree structure into a flat structure used by the algorithms.
- Bug fix - Skip
setState
oncomponentWillReceiveProps
if no rows were calculated. #209
- Bug fix - If there are no draggable headers, do not inject
dnd.Header
. This means you don't need to set up React DnD if you aren't using drag and drop functionality. #209
- Breaking - Push children toggle behavior to
onToggleShowingChildren
prop. See the readme for a sample implementation. This makes the implementation more flexible. You can triggerreactabular-tree
collapseAll
andexpandAll
overshowingChildren
for instance.
- Feature - Let
toggleChildren
toggle when cell is clicked. If you want the old behavior, overrideonClick
throughprops
. - Feature - Add
collapseAll
andexpandAll
helpers.
- Feature - Accept
toggleChildrenProps
for customization.
- Feature - Allow
toggleChildren
to acceptprops
for customization.
- Feature - Pass
extraParameters
toedit
interface. #201
- Feature - Add
sort.byColumnsPrioritizeLastSorted
. #199
- Breaking - Push
onDragColumn
control to user. Earlier it managed widths through CSS (more performant, but also more brittle). The problem with that was that the initial update of a stylesheet could fail (no widths were set). Now widths are controlled by React completely. Note that the API changed toonDragColumn(width, { columnIndex })
.
- Feature - Allow
BodyRow
shouldComponentUpdate
to be overridden by settingcomponents.body.row.shouldComponentUpdate = true
.
- Bug fix - Rework initial measurement so that it works with CSS solutions like Radium.
- Feature - Allow
id
to be passed tofilter
.
- Bug fix - Pass
rowKey
totree.filter
. This way it filters correctly with arbitrary ids.
- Feature - Allow
toggleChildren
id
to be customized (not just "id" anymore).
- Bug fix - Pass
rowKey
totree.toggleChildren
. This way toggling can work with arbitrary ids.
- Bug fix - Drop redundant
console.log
.
- Feature - Push development logging behind
window.LOG_VIRTUALIZED
.
- Feature - Include suggested default styling for the toggle arrow.
- Bug fix - Keep header and body in sync when scrolling at header.
- Bug fix - Pass
strategy
tosorter
attree.sort
.
- Feature - New standalone package. Virtualization provides a nice performance increase for large datasets. The package works in tandem with reactabular-sticky.
- Breaking -
onRow
acceptsrow, { rowIndex, rowKey }
instead ofrow, rowIndex
. - Feature - If a row contains
_index
, use that as arowIndex
. This allows custom indexing (useful for virtualization).
- Feature - Integrate virtualization for extra performance.
- Feature - Integrate
reactabular-tree
. Now it works with tree style data. You should setcell.toggleChildren: true
to show the UI control for toggling row children visibility.
- Feature - Expose
parent
prop (defaults todocument
). This is handy if you use an iframe and need something more custom.
- Breaking - Rewrite API. Now most parts accept objects and you can also customize field names.
- Feature - Add
tree.sort
to wrap toggling row children.
- Bug fix - Make sure
scrollOffset
gets a value no matter what. This avoid a React warning.
- Add
resolveRowKey
.
- Bug fix - Make sure
sort.byColumns
does not mutate passedsortingColumns
. Now it performs a deep clone using lodash.
- Feature - Allow
onScroll
handler to be defined forBody
. Previously it overrode that.
- Feature - Allow
Body
rowKey
to be defined as a function (({ rowData, rowIndex }) => {... return a rowKey ...}
). #193
- Bug fix - Calculate extra padding to table body so that header and body widths match even if a scrollbar is visible.
- Feature - If an empty column definition is provided, escape early and avoid showing a warning per row.
- Feature - Allow value rendering to be customized. Now you can pass a custom renderer for value if the default (no visible value!) isn't enough.
- Bug fix - Make sure
resolve
does not crash ifrows
aren't provided. It will return an empty array in that case.
- Feature - Generate a proper ES6 build for each package. This time it transpiles ES6 features too unlike before. The problem was that Babel didn't transpile object rest spread within ES6 classes correctly. This means ES6 -> ES5 transformation needs to be performed. Not ideal, but this works.
- Breaking - Push
property
to root level of a column over cell. The new style is often terser. - Feature - Generate a proper ES6 build for each package. Now they should work with systems like webpack 2 without problems. #189
- Breaking - Rename as
react-edit
given it's a generic component. It's not distributed as a part ofreactabular
anymore and you'll have to install it separately. #176. - Breaking - Auto focus
input
by default. #180.
- Feature - Improve performance by pushing
onRow
check lower in the component hierarchy.
- Breaking - Override
query
onChange
instead of patching. - Breaking - Make it possible to pass
column
as a prop. You should manage its state now. #182 - Feature - Add
onColumnChange
hook. This is needed for trackingcolumn
state. - Bug fix - Make search input controlled by default.
- Breaking - Return sorting columns if no selected column is passed.
- Breaking - Extract header styling to a separate file (
style.css
at package root) and allowstyle
prop to be passed. - Breaking - Port sorting to a property based scheme over index one.
- Feature - Mark React as a peer dependency.
- Feature - Allow sorting
fieldName
to be customized forsort
,header
, andreset
. This is useful if you want to sort perproperty
for example. - Feature - Allow
sorter
getColumns
mechanism to be customized. This is needed to makefieldName
useful.
- Breaking - Extract header styling to a separate file (
style.css
at package root) and allowstyle
prop to be passed. - Feature - Document how to offset the widget.
- Breaking - Push
sortingColumns
to a prop. You should control its state yourself. - Feature - Add suggested default styling (
style.css
at package root). - Feature - Allow
classNames
andstyles
props to be passed for styling. - Bug fix - Force update after mounting. This is needed for the sticky ref scheme to work.
- Breaking - Rework
resolve
interface to be object based and pass row index through it. - Feature - Implement
resolve.index
. This attached the row indices to_index
. That can be handy data to have for optimization.
- Feature - New standalone package of its own. #183
- Feature - New standalone package of its own for wrapping drag and drop related concerns.
- Feature - New standalone package of its own for tree helpers. #168
- Feature - select - Drop direct dependency on Reactabular.
- Feature - easy - Expose
components
. Now you can override default components just like for a regularTable.Provider
. Only exception isheader.cell
given drag and drop needs to override that in order to work. - Feature - easy - Make
selectedRowIdField
prop optional. It worked before due to the default value, but it's neater this way.
- Feature - search-field - Accept
query
as a prop now. Better for persistency.
- Feature - search-columns - Rewrite as a stateless function. You should pass
query
as a prop now.
- Feature - reactabular - New
search-columns
module for searching per column (UI). - Feature - reactabular - New
search-field
module for searching (UI). - Feature - table - Make
rowKey
propType check compatible with React 15.3. It should give you better output during development now. - Feature - easy - Expose
headerExtra
prop. It can be used to inject extra rows to a header. This works well withreactabular-search-columns
. - Feature - easy - Expose
onSort
andsortingColumns
props. These are useful for implementing sorting persistency.
- Bug fix - resizable - Fix README example as Sticky API has been simplified (no need for ReactDOM anymore).
- Feature - edit - Expose
event
toonActivate
. - Feature - easy - Push
reactabular
andreactabular-utils
as peer dependencies. This way you have better control over which versions to consume at your project.
- Bug fix - table - Pass unresolved values to
Table.Body
transforms instead of resolved ones.
- Feature - edit - Allow
activateEvent
(defaultonClick
) to be overridden. - Feature - easy - Trigger
onMoveColumns
only after moving columns has finished. - Feature - easy - Expose
selectedRowId
. It defaults toid
, but if your selection logic relies on some other field, you can change it now. - Feature - reactabular - New
select
module for handling row selections.
- Feature - Attach
NODE_ENV
checks topropTypes
. Smaller size for production usage.
- Bug fix - sort - Do not crash if column
cell
definition is missing. #178
- Bug fix - easy - If a header is set both
sortable
andresizable
, allow custom formatter to used still.
- Bug fix - sticky - Fix
reactabular-table
import. Missing* as
.
- Bug fix - sticky - Fix
reactabular-table
import. It points to the correct package now. - Feature - table - Drop
lodash/omit
dependency.
- Feature - edit - Allow
editingProps
(value
/onValue
) to be overridden. - Feature - table - Added
getRef
for getting references to underlying DOM elements. - Feature - sticky - Added
getRef
for getting references to underlying DOM elements. - Feature - sticky - Moved
reactabular-table
as a peer dependency as I realized it's better to let the user decide which version of the table to use. - Feature - easy - Dropped dependency on react-dom.
- Bug fix - sort -
sort.reset
accepts object properly now. Earlier it bailed out too early. - Feature - Add sorting numbers to the header so you know in which order sorting rules are applied.
- Feature - Allow column sorting status to be reset by doubleclicking on a column header.
- Feature - sort -
sort.sort
acceptsevent
parameter now. It defaults toonClick
. - Feature - sort -
sort.reset
is a new transform that can be used to remove the given column from the sorting rules. - Feature - sort -
sort.header
is a new formatter that can be used to apply sorting. This is handy if you usesort.reset
.
- Feature - easy - Make
tableWidth
andtableHeight
checks looser.
- Bug fix - easy - Merge column definition
props.className
correctly. Previously it discarded possible value. - Feature - easy - Add styling hooks. Now you can attach classes to the table structure (table, thead, tbody).
- Feature - easy - Add
onDragColumn
andonMoveColumns
hooks.
- Feature - highlight - Do not pass
undefined
keys to_highlights
data. - Feature - easy - Add column visibility to the example.
- Feature - easy - Render
EasyTable
in a fixed viewport. - Bug fix - easy - Do not re-initialize styles if columns change. Without this CSS resets. I may have to revisit this decision but it seems logical now.
- Feature - easy - Support
draggable
header flag.
- Feature - sticky - Make
tableHeader
prop check looser. - Feature - easy - Resolve nested and
cell.resolve
based data. - Feature - easy - Support search with highlighting through a
query
prop.
- Feature - resizable - New module for resizing columns.
- Feature - sticky - New pair of components (
Sticky.Header
,Sticky.Body
) that allow you to render data within a fixed viewport.
- Feature - resolve - Make sure
undefined
keys aren't included in the resolved result. - Bug fix - highlight - Retain original data while highlighting rows.
- Complete rewrite. Too many changes to mention. Please study the documentation for details.
- Bug fix - Fix
postinstall
script for Node 0.10. #147 @Gudahtt
- Bug fix - Use a ref at
input
editor overthis.getDOMNode()
given latter was deprecated in React 15.
- Breaking - Force
rowKey
to be set. This helps with performance so better set that. #135 - Feature - Drop dependency on
react/lib/update
. Smaller bundle this way too. - Feature - Drop dependency on
lodash/merge
.
- Feature - Support for multiple search filters. #138 @szdc
- Expand React peer dependency range to include React 15.
- Breaking - Bump lodash minimum version to 4.0.
- Feature - Import only specific lodash functions. #134 @callahad
- Bug fix - Don't attempt to merge table cell values. #132 @trun
- Feature - Allow
Search
"all" to be translated. #130
- Bug fix - Cell functions could be skipped when two columns shared the same property. #129 @MrOrz
- Feature - Relaxed about lodash peer version, now < 5. #128 @FredericHeem
- Feature - Support multi-column sorts a la react-datagrid (cycle through ascending, descending, none independently). #127 @JeffSanchez
- Bug Fix - ”formatter shortcut” logic in cell function. #125 @MrOrz
- Bug Fix - Do not show React elements at search dropdown Only strings and numbers are allowed. #124
- Bug Fix - Merge props & values of cell functions correctly. #53, #122 @MrOrz
- Documentation - Correct usage from props.header to props.columnNames. #121 @goldensunliu
- Documentation - Fix object protocol example. #117 @arkon
- Demo - Updated react-pagify
- Demo - Add double click example for cell
- Breaking - Replaced
className
withheaderClass
. #113 @goldensunliu
- Feature - Support Node 0.10 again. #112 @bjrmatos