Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix metrics auto complete error #971

Merged
merged 1 commit into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/Inputs/AnnotationsInput/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ class AutoCompleteWrapper extends React.Component {

render() {
const { onSelected, ...rest } = this.props
return <AutoComplete onSelected={this.handleSelect} {...rest} />
return (
<AutoComplete onSelected={this.handleSelect} maxVisible={60} {...rest} />
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ export default class MetircQueryInput extends Component {
}

render() {
const { name, supportDebugButton = false, value } = this.props
const {
name,
supportDebugButton = false,
value,
supportMetrics,
onChange,
} = this.props

return (
<div className={styles.wrapper}>
Expand All @@ -59,12 +65,13 @@ export default class MetircQueryInput extends Component {
<div className={styles.input}>
<AutoComplete
value={value}
onChange={this.props.onChange}
onChange={onChange}
onSelected={this.onSelected}
name={name}
className={styles.autoComplete}
options={this.props.supportMetrics}
options={supportMetrics}
optionRenderer={this.optionRenderer}
maxVisible={60}
/>
</div>
{supportDebugButton && (
Expand Down