fix(mail-merge): Fix validation -- trim email strings

- Don't block send button if validation fails
This commit is contained in:
Juan Tejada 2016-06-03 16:07:29 -07:00
parent 0e808003ff
commit 95b3939885
3 changed files with 15 additions and 15 deletions

View file

@ -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})
}
}

View file

@ -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}
}
}

@ -1 +1 @@
Subproject commit 343c95dd41d86d9ab4f40e72cfb7c48ce0f97dc8
Subproject commit af47bb0b93ff1430d1d6ad86ac517b112088d074