[DE PE] Fix Bug 57696

This commit is contained in:
ShimaginAndrey 2022-06-22 09:33:01 +03:00
parent 02a88b340a
commit 618553a03d
2 changed files with 19 additions and 33 deletions

View file

@ -243,25 +243,18 @@ const PageNumbers = observer( props => {
return ( return (
<View className='numbers dataview'> <View className='numbers dataview'>
{numberArrays.map((numbers, index) => ( <List className="row" style={{listStyle: 'none'}}>
<List className="row" style={{listStyle: 'none'}} key={'numbers-' + index}> {numberArrays.map( number => (
{numbers.map((number) => ( <ListItem key={'number-' + number.subtype} data-type={number.subtype} className={(number.subtype === typeNumbers) &&
<ListItem key={'number-' + number.type} data-type={number.type} className={(number.type === typeNumbers) &&
(storeTextSettings.listType === 1 || storeTextSettings.listType === -1) ? 'active' : ''} (storeTextSettings.listType === 1 || storeTextSettings.listType === -1) ? 'active' : ''}
onClick={() => { onClick={() => {
storeTextSettings.resetNumbers(number.type); storeTextSettings.resetNumbers(number.subtype);
props.onNumber(number.type); props.onNumber(number.subtype);
}}> }}>
{number.thumb.length < 1 ? <div id={`id-numbers-${number.subtype}`} className='item-number'></div>
<Icon className="thumb" style={{position: 'relative'}}>
<label>{t('Edit.textNone')}</label>
</Icon> :
<Icon className="thumb" icon={`icon-numbers-${number.type}`} />
}
</ListItem> </ListItem>
))} ))}
</List> </List>
))}
</View> </View>
); );
}); });

View file

@ -570,25 +570,18 @@ const PageNumbers = observer(props => {
return ( return (
<View className='numbers dataview'> <View className='numbers dataview'>
{numberArrays.map((numbers, index) => ( <List className="row" style={{listStyle: 'none'}}>
<List className="row" style={{listStyle: 'none'}} key={'numbers-' + index}> {numberArrays.map( number => (
{numbers.map((number) => ( <ListItem key={'number-' + number.subtype} data-type={number.subtype} className={(number.subtype === typeNumbers) &&
<ListItem key={'number-' + number.type} data-type={number.type} className={(number.type === typeNumbers) && (storeTextSettings.listType === 1 || storeTextSettings.listType === -1) ? 'active' : ''}
(storeTextSettings.listType === 1 || storeTextSettings.listType === -1) ? 'active' : ''} onClick={() => {
onClick={() => { storeTextSettings.resetNumbers(number.subtype);
storeTextSettings.resetNumbers(number.type); props.onNumber(number.subtype);
props.onNumber(number.type); }}>
}}> <div id={number.id} className='item-number'></div>
{number.thumb.length < 1 ? </ListItem>
<Icon className="thumb" style={{position: 'relative'}}> ))}
<label>{_t.textNone}</label> </List>
</Icon> :
<Icon className="thumb" icon={`icon-numbers-${number.type}`} />
}
</ListItem>
))}
</List>
))}
</View> </View>
); );
}); });