We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d329e84 commit 4f5336fCopy full SHA for 4f5336f
src/components/fields/AxesSelector.js
@@ -23,6 +23,7 @@ class AxesSelector extends Component {
23
localize: _,
24
} = this.context;
25
const {axesOptions} = this.props;
26
+ const maxCharsThatFitInRadio = 27;
27
const maxOptions = axesOptions.length > 4; // eslint-disable-line
28
29
const multipleSublots =
@@ -42,7 +43,12 @@ class AxesSelector extends Component {
42
43
)
44
: axesOptions;
45
- return maxOptions ? (
46
+ const totalCharsInOptions =
47
+ (options &&
48
+ options.map(o => o.label).reduce((acc, o) => acc + o.length, 0)) ||
49
+ 0;
50
+
51
+ return maxOptions || totalCharsInOptions >= maxCharsThatFitInRadio ? (
52
<Field {...this.props} label={_('Axis to Style')}>
53
<Dropdown
54
options={options}
0 commit comments