mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-02 02:53:01 +08:00
fix(mail-merge): Fix validation -- trim email strings
- Don't block send button if validation fails
This commit is contained in:
parent
0e808003ff
commit
95b3939885
3 changed files with 15 additions and 15 deletions
|
@ -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})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
src/pro
2
src/pro
|
@ -1 +1 @@
|
|||
Subproject commit 343c95dd41d86d9ab4f40e72cfb7c48ce0f97dc8
|
||||
Subproject commit af47bb0b93ff1430d1d6ad86ac517b112088d074
|
Loading…
Reference in a new issue