diff --git a/src/components/editable-table.jsx b/src/components/editable-table.jsx index d8501aae9..b9b776de7 100644 --- a/src/components/editable-table.jsx +++ b/src/components/editable-table.jsx @@ -96,7 +96,7 @@ export class EditableTableCell extends Component { const {target: {value}} = event const {tableDataSource, isHeader, rowIdx, colIdx, onCellEdited} = this.props const currentValue = tableDataSource.cellAt({rowIdx, colIdx}) - if (value && value !== currentValue) { + if (value != null && value !== currentValue) { onCellEdited({rowIdx, colIdx, isHeader, value}) } } diff --git a/src/components/table/table-data-source.es6 b/src/components/table/table-data-source.es6 index fad553246..09c113af6 100644 --- a/src/components/table/table-data-source.es6 +++ b/src/components/table/table-data-source.es6 @@ -117,19 +117,6 @@ export default class TableDataSource { return this._tableData.columns } - toJSON() { - return {...this._tableData} - } - - filterRows(filterFn) { - const rows = this.rows() - const nextRows = rows.filter(filterFn) - return new TableDataSource({ - ...this._tableData, - rows: nextRows, - }) - } - /** * Adds column * @@ -231,5 +218,18 @@ export default class TableDataSource { clear() { return new TableDataSource() } + + filterRows(filterFn) { + const rows = this.rows() + const nextRows = rows.filter(filterFn) + return new TableDataSource({ + ...this._tableData, + rows: nextRows, + }) + } + + toJSON() { + return {...this._tableData} + } } diff --git a/src/pro b/src/pro index 343c95dd4..af47bb0b9 160000 --- a/src/pro +++ b/src/pro @@ -1 +1 @@ -Subproject commit 343c95dd41d86d9ab4f40e72cfb7c48ce0f97dc8 +Subproject commit af47bb0b93ff1430d1d6ad86ac517b112088d074