From 09ff6349f4f8e047717a477573eab67a68a3038f Mon Sep 17 00:00:00 2001 From: Edmundo Alvarez Date: Fri, 1 Dec 2017 18:33:05 +0100 Subject: [PATCH] Remove LinkedStateMixin from InputDropdown --- .../src/components/inputs/InputDropdown.jsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/graylog2-web-interface/src/components/inputs/InputDropdown.jsx b/graylog2-web-interface/src/components/inputs/InputDropdown.jsx index abec298b6ee7..5561d951872e 100644 --- a/graylog2-web-interface/src/components/inputs/InputDropdown.jsx +++ b/graylog2-web-interface/src/components/inputs/InputDropdown.jsx @@ -1,6 +1,5 @@ import PropTypes from 'prop-types'; import React from 'react'; -import LinkedStateMixin from 'react-addons-linked-state-mixin'; import { Button } from 'react-bootstrap'; import { Input } from 'components/bootstrap'; @@ -14,7 +13,6 @@ const InputDropdown = React.createClass({ onLoadMessage: PropTypes.func, disabled: PropTypes.bool, }, - mixins: [LinkedStateMixin], getInitialState() { return { selectedInput: this.props.preselectedInputId || this.PLACEHOLDER, @@ -37,7 +35,11 @@ const InputDropdown = React.createClass({ ); }, + onSelectedInputChange(event) { + this.setState({ selectedInput: event.target.value }); + }, render() { + const { selectedInput } = this.state; // When an input is pre-selected, show a static dropdown if (this.props.inputs && this.props.preselectedInputId) { return ( @@ -45,7 +47,7 @@ const InputDropdown = React.createClass({ {this._formatStaticInput(this.props.inputs.get(this.props.preselectedInputId))} @@ -60,14 +62,15 @@ const InputDropdown = React.createClass({ {inputs.toArray()}