Merge pull request #11314 from influxdata/fixes/dont-verify-line-protocol-on-change

Wait till submit to verify manual line protocol
pull/11320/head
Brandon Farmer 2019-01-18 15:09:37 -08:00 committed by GitHub
commit f04cf3ecd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -43,7 +43,7 @@ export default class extends PureComponent<Props> {
<TextArea
value={lineProtocolBody}
placeholder="Write text here"
onChange={this.handleSetLineProtocol}
onChange={this.handleTextChange}
/>
)
case LineProtocolTab.EnterURL:
@ -78,9 +78,14 @@ export default class extends PureComponent<Props> {
this.props.onURLChange(value)
}
private handleSetLineProtocol = async (lpBody: string) => {
private handleTextChange = async (lpBody: string) => {
const {setLineProtocolBody} = this.props
setLineProtocolBody(lpBody)
}
private handleSetLineProtocol = (lpBody: string) => {
const {setLineProtocolBody, handleSubmit} = this.props
await setLineProtocolBody(lpBody)
setLineProtocolBody(lpBody)
if (handleSubmit) {
handleSubmit()
}