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

Add tags to filter options #52

Merged
merged 3 commits into from Jun 14, 2017
Merged

Add tags to filter options #52

merged 3 commits into from Jun 14, 2017

Conversation

@mariussturm
Copy link
Contributor

@mariussturm mariussturm commented Mar 17, 2017

@bernd bernd added this to the 2.3.0 milestone Jun 6, 2017
</Button>
</div>
<div className="form-inline collectors-filter-form">
<CollectorFilter ref="collectorsFilter"

This comment has been minimized.

@edmundoa

edmundoa Jun 9, 2017
Member

We didn't know about this when creating the PR, but we should avoid string refs:
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md

The easiest way to fix it is to replace the ref with something like: ref={(c) => { this._collectorsFilter = c; }}, and then use this._collectorsFilter when accessing the component.

return (
<div className="filter">
<form className="form-inline" onSubmit={this._onSearchTextChanged} style={{ display: 'inline' }}>
<TypeAheadInput ref="typeAheadInput"

This comment has been minimized.

@edmundoa

edmundoa Jun 9, 2017
Member

Same problem I described about string refs:
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md

The easiest way to fix it is to replace the ref with something like: ref={(c) => { this.__typeAheadInput = c; }}, and then use this._typeAheadInput when accessing the component.


const CollectorFilter = React.createClass({
propTypes: {
data: React.PropTypes.array,

This comment has been minimized.

@edmundoa

edmundoa Jun 9, 2017
Member

We should make these props required or provide default values to make ESLint happy.
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md

Copy link
Member

@edmundoa edmundoa left a comment

LGTM 👍

@edmundoa edmundoa merged commit f0e63b9 into master Jun 14, 2017
3 checks passed
3 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@garybot2
graylog-project/pr Jenkins build graylog-project-pr-snapshot 215 has succeeded
Details
@edmundoa edmundoa deleted the filter-by-tag branch Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants