diff --git a/web/src/css/header.less b/web/src/css/header.less index 042d6811e..97c699304 100644 --- a/web/src/css/header.less +++ b/web/src/css/header.less @@ -113,5 +113,12 @@ header { .popover-content { max-height: 500px; overflow-y: auto; + + tr { + cursor: pointer; + &:hover { + background-color: hsla(209, 52%, 84%, 0.5) !important; + } + } } } diff --git a/web/src/js/components/Header/FilterDocs.jsx b/web/src/js/components/Header/FilterDocs.jsx index 49fb5fbc6..b471840be 100644 --- a/web/src/js/components/Header/FilterDocs.jsx +++ b/web/src/js/components/Header/FilterDocs.jsx @@ -37,7 +37,7 @@ export default class FilterDocs extends Component { {doc.commands.map(cmd => ( - + this.props.selectHandler(cmd[0].split(" ")[0] + " ")}> diff --git a/web/src/js/components/Header/FilterInput.jsx b/web/src/js/components/Header/FilterInput.jsx index e421f1a49..12479c105 100644 --- a/web/src/js/components/Header/FilterInput.jsx +++ b/web/src/js/components/Header/FilterInput.jsx @@ -21,6 +21,7 @@ export default class FilterInput extends Component { this.onKeyDown = this.onKeyDown.bind(this) this.onMouseEnter = this.onMouseEnter.bind(this) this.onMouseLeave = this.onMouseLeave.bind(this) + this.selectFilter = this.selectFilter.bind(this) } componentWillReceiveProps(nextProps) { @@ -41,7 +42,7 @@ export default class FilterInput extends Component { getDesc() { if (!this.state.value) { - return + return } try { return Filt.parse(this.state.value).desc @@ -85,6 +86,11 @@ export default class FilterInput extends Component { e.stopPropagation() } + selectFilter(cmd) { + this.setState({value: cmd}) + ReactDOM.findDOMNode(this.refs.input).focus() + } + blur() { ReactDOM.findDOMNode(this.refs.input).blur() }
{cmd[0].replace(' ', '\u00a0')} {cmd[1]}