()
| 23 | } |
| 24 | |
| 25 | getSelectedOption() { |
| 26 | const { options, selectedOption } = this.props; |
| 27 | if (_.indexOf(options, selectedOption) === -1) { |
| 28 | // eslint-disable-next-line no-console |
| 29 | console.warn( |
| 30 | `Invalid \`selectedOption\` ${JSON.stringify(selectedOption)}, ` + |
| 31 | 'DropDownMenu `selectedOption` must be a member of `options`.' + |
| 32 | 'Check that you are using the same reference in both `options` and `selectedOption`.', |
| 33 | ); |
| 34 | |
| 35 | return null; |
| 36 | } |
| 37 | |
| 38 | return selectedOption; |
| 39 | } |
| 40 | |
| 41 | collapse() { |
| 42 | this.setState({ collapsed: true }); |
no outgoing calls
no test coverage detected