[PE] Fix Bug 51555

This commit is contained in:
ShimaginAndrey 2021-08-03 12:00:24 +03:00
parent ade22c4a45
commit 74a0573c2a

View file

@ -6,6 +6,7 @@ import {Device} from '../../../../../common/mobile/utils/device';
const AddSlide = props => {
const layouts = props.storeSlideSettings.slideLayouts;
const [stateDisabled, setDisabled] = useState(false);
return (
<div className={'dataview slide-layout'}>
{layouts.map((row, rowIndex) => {
@ -13,7 +14,8 @@ const AddSlide = props => {
<ul key={`row-${rowIndex}`} className={'row'}>
{row.map((layout, index) => {
return (
<li key={`item-${rowIndex}-${index}`} onClick={() => {props.onSlideLayout(layout.type)}}>
<li className = {stateDisabled ? 'disabled' : ''} key={`item-${rowIndex}-${index}`}
onClick={() => {props.onSlideLayout(layout.type); setDisabled(true)}}>
<img src={layout.image} width={layout.width} height={layout.height}/>
</li>
)