-
Notifications
You must be signed in to change notification settings - Fork 30
Delete new row when cancel is clicked #430
Conversation
Pull Request Test Coverage Report for Build 1766
💛 - Coveralls |
| onStepDataChanged = (tabKey, value, valid, editing = false) => { | ||
| const validatedTabData = validateTabData(tabKey, value, valid); | ||
| this.safeSetState(state => ({ | ||
| editing, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the tab should merely request to lock the createVmWizard and not take Wizard state into account. This is very useful when using asynchronous actions.
I suggest something like:
{
stepData: {
[tabKey]: {
lockStep
}
}
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, lockStep is under [tabKey] now
|
|
||
| let type = ON_CANCEL; | ||
| if (this.props.rows[index].newRow) { | ||
| rows = this.props.rows.filter(row => row.id !== id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we rather call onDelete method from here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extracted onDelete to separate function which is now reused where needed
Disable back/next buttons while editing table https://bugzilla.redhat.com/show_bug.cgi?id=1646953
Disable back/next buttons while editing table https://bugzilla.redhat.com/show_bug.cgi?id=1646953
Disable back/next buttons while editing table https://bugzilla.redhat.com/show_bug.cgi?id=1646953
https://bugzilla.redhat.com/show_bug.cgi?id=1646953