diff --git a/packages/neos-ui/src/Containers/PrimaryToolbar/DimensionSwitcher/DimensionSelectorOption.js b/packages/neos-ui/src/Containers/PrimaryToolbar/DimensionSwitcher/DimensionSelectorOption.js index ef617ee75b..715bb7d545 100644 --- a/packages/neos-ui/src/Containers/PrimaryToolbar/DimensionSwitcher/DimensionSelectorOption.js +++ b/packages/neos-ui/src/Containers/PrimaryToolbar/DimensionSwitcher/DimensionSelectorOption.js @@ -22,15 +22,14 @@ export default class DimensionSelectorOption extends PureComponent { [style.nonExistent]: !option.existing }); - if(!option.disallowed && option.existing && option.url){ - + if (!option.disallowed && option.existing && option.url) { const linkOptions = { href: option.url, target: '_blank', rel: 'noopener noreferrer', onClick: (event) => event.preventDefault() } - return ( + return ( // eslint-disable-next-line camelcase { + createDirectDimensionsLink = (dimensionName, presetName) => { const {documentNode} = this.props; const nodeContextPath = documentNode.properties._path + ';' + dimensionName + '=' + presetName @@ -293,12 +293,10 @@ export default class DimensionSwitcher extends PureComponent { } Object.entries(variants).forEach(entry => { const [key, value] = entry; - console.log(value[dimensionKey]) - if(value[dimensionKey] != this.state.transientPresets[dimensionKey]){ - delete variants[key] + if (value[dimensionKey] !== this.state.transientPresets[dimensionKey]) { + delete variants[key] } }); - } const dimensions = [] Object.values(variants).forEach(entry => { @@ -317,8 +315,8 @@ export default class DimensionSwitcher extends PureComponent { return Object.assign({}, presetConfiguration, { label: i18nRegistry.translate(presetConfiguration.label), disallowed: !(allowedPresets[dimensionName] && allowedPresets[dimensionName].includes(presetName)), - existing: documentDimensions.some(dimension=> presetConfiguration.values.includes(dimension)), - url: (Object.keys(contentDimensions).length === 1) ? this.createDirectDimensionsLink( dimensionName, presetName) : null + existing: documentDimensions.some(dimension => presetConfiguration.values.includes(dimension)), + url: (Object.keys(contentDimensions).length === 1) ? this.createDirectDimensionsLink(dimensionName, presetName) : null }); }); } diff --git a/packages/react-ui-components/src/SelectBox_Option_SingleLine/selectBox_Option_SingleLine.js b/packages/react-ui-components/src/SelectBox_Option_SingleLine/selectBox_Option_SingleLine.js index 0526a9dc55..6578736c6b 100644 --- a/packages/react-ui-components/src/SelectBox_Option_SingleLine/selectBox_Option_SingleLine.js +++ b/packages/react-ui-components/src/SelectBox_Option_SingleLine/selectBox_Option_SingleLine.js @@ -43,9 +43,9 @@ class SelectBox_Option_SingleLine extends PureComponent { {option.label} + title={option.title ? option.title : option.label}>{option.label} ) : ( - {option.label} + {option.label} )} );