Prevent click tag filter input from closing tag list item
parent
9ff9f63dd2
commit
b23732a7a6
|
@ -1,5 +1,5 @@
|
|||
import PropTypes from 'prop-types'
|
||||
import React, {PureComponent} from 'react'
|
||||
import React, {PureComponent, ChangeEvent} from 'react'
|
||||
|
||||
import _ from 'lodash'
|
||||
|
||||
|
@ -80,7 +80,7 @@ class MeasurementList extends PureComponent<Props, State> {
|
|||
this.getMeasurements()
|
||||
}
|
||||
|
||||
public handleFilterText(e) {
|
||||
public handleFilterText(e: ChangeEvent<HTMLInputElement>) {
|
||||
e.stopPropagation()
|
||||
const filterText = e.target.value
|
||||
this.setState({
|
||||
|
|
|
@ -69,6 +69,10 @@ class TagListItem extends PureComponent<Props, State> {
|
|||
this.props.onGroupByTag(this.props.tagKey)
|
||||
}
|
||||
|
||||
public handleInputClick(e: MouseEvent<HTMLInputElement>) {
|
||||
e.stopPropagation()
|
||||
}
|
||||
|
||||
public renderTagValues() {
|
||||
const {tagValues, selectedTagValues} = this.props
|
||||
if (!tagValues || !tagValues.length) {
|
||||
|
@ -88,6 +92,7 @@ class TagListItem extends PureComponent<Props, State> {
|
|||
value={this.state.filterText}
|
||||
onChange={this.handleFilterText}
|
||||
onKeyUp={this.handleEscape}
|
||||
onClick={this.handleInputClick}
|
||||
spellCheck={false}
|
||||
autoComplete="false"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue