fix: http auth component state retention issue (#4394)

* Set the value if set is available

* tests: add failing e2e test case

* use Object.assign to always ensure setState receives a new value object
This commit is contained in:
Helder Sepulveda
2018-04-20 19:08:39 -04:00
committed by kyle
parent 553acee07d
commit 62ed4db110
3 changed files with 131 additions and 1 deletions

View File

@@ -33,7 +33,8 @@ export default class HttpAuth extends React.Component {
let { onChange } = this.props
let { value, name } = e.target
let newValue = this.state.value || {}
let newValue = Object.assign({}, this.state.value)
if(name) {
newValue[name] = value
} else {