diff --git a/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js b/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js index 904e88477..da2d37767 100644 --- a/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js +++ b/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js @@ -2,6 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import IconButton from '../../../components/icon_button'; +import Toggle from 'react-toggle'; import { injectIntl, defineMessages } from 'react-intl'; const messages = defineMessages({ @@ -55,6 +56,10 @@ export default class AdvancedOptionsDropdown extends React.PureComponent { this.props.onChange(option); } + toggleHandler(option) { + return () => this.props.onChange(option); + } + setRef = (c) => { this.node = c; } @@ -69,10 +74,9 @@ export default class AdvancedOptionsDropdown extends React.PureComponent { const optionElems = options.map((option) => { const active = values.get(option.key) ? 'active' : ''; return ( -