[DE mobile] Changing event for switches

This commit is contained in:
SergeyEzhin 2021-03-16 18:06:12 +03:00
parent 2ab1d32e97
commit d16393eb69
3 changed files with 16 additions and 16 deletions

View file

@ -79,21 +79,21 @@ const PageAdvancedSettings = props => {
</List> </List>
<List> <List>
<ListItem title={t('Edit.textSpaceBetweenParagraphs')}> <ListItem title={t('Edit.textSpaceBetweenParagraphs')}>
<Toggle checked={spaceBetween} onToggleChange={() => {props.onSpaceBetween(!spaceBetween)}}/> <Toggle checked={spaceBetween} onChange={() => {props.onSpaceBetween(!spaceBetween)}}/>
</ListItem> </ListItem>
</List> </List>
<List> <List>
<ListItem title={t('Edit.textPageBreakBefore')}> <ListItem title={t('Edit.textPageBreakBefore')}>
<Toggle checked={breakBefore} onToggleChange={() => {props.onBreakBefore(!breakBefore)}}/> <Toggle checked={breakBefore} onChange={() => {props.onBreakBefore(!breakBefore)}}/>
</ListItem> </ListItem>
<ListItem title={t('Edit.textOrphanControl')}> <ListItem title={t('Edit.textOrphanControl')}>
<Toggle checked={orphanControl} onToggleChange={() => {props.onOrphan(!orphanControl)}}/> <Toggle checked={orphanControl} onChange={() => {props.onOrphan(!orphanControl)}}/>
</ListItem> </ListItem>
<ListItem title={t('Edit.textKeepLinesTogether')}> <ListItem title={t('Edit.textKeepLinesTogether')}>
<Toggle checked={keepTogether} onToggleChange={() => {props.onKeepTogether(!keepTogether)}}/> <Toggle checked={keepTogether} onChange={() => {props.onKeepTogether(!keepTogether)}}/>
</ListItem> </ListItem>
<ListItem title={t('Edit.textKeepWithNext')}> <ListItem title={t('Edit.textKeepWithNext')}>
<Toggle checked={keepWithNext} onToggleChange={() => {props.onKeepNext(!keepWithNext)}}/> <Toggle checked={keepWithNext} onChange={() => {props.onKeepNext(!keepWithNext)}}/>
</ListItem> </ListItem>
</List> </List>
</Page> </Page>

View file

@ -317,10 +317,10 @@ const PageWrap = props => {
} }
<List> <List>
<ListItem title={_t.textMoveWithText} className={'inline' === wrapType ? 'disabled' : ''}> <ListItem title={_t.textMoveWithText} className={'inline' === wrapType ? 'disabled' : ''}>
<Toggle checked={moveText} onToggleChange={() => {props.onMoveText(!moveText)}}/> <Toggle checked={moveText} onChange={() => {props.onMoveText(!moveText)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textAllowOverlap}> <ListItem title={_t.textAllowOverlap}>
<Toggle checked={overlap} onToggleChange={() => {props.onOverlap(!overlap)}}/> <Toggle checked={overlap} onChange={() => {props.onOverlap(!overlap)}}/>
</ListItem> </ListItem>
</List> </List>
{ {

View file

@ -21,10 +21,10 @@ const PageTableOptions = props => {
<Navbar title={_t.textOptions} backLink={_t.textBack} /> <Navbar title={_t.textOptions} backLink={_t.textBack} />
<List> <List>
<ListItem title={_t.textRepeatAsHeaderRow} className={isRepeat === null ? 'disabled' : ''}> <ListItem title={_t.textRepeatAsHeaderRow} className={isRepeat === null ? 'disabled' : ''}>
<Toggle checked={isRepeat} onToggleChange={() => {props.onOptionRepeat(!isRepeat)}}/> <Toggle checked={isRepeat} onChange={() => {props.onOptionRepeat(!isRepeat)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textResizeToFitContent}> <ListItem title={_t.textResizeToFitContent}>
<Toggle checked={isResize} onToggleChange={() => {props.onOptionResize(!isResize)}}/> <Toggle checked={isResize} onChange={() => {props.onOptionResize(!isResize)}}/>
</ListItem> </ListItem>
</List> </List>
<BlockTitle>{_t.textCellMargins}</BlockTitle> <BlockTitle>{_t.textCellMargins}</BlockTitle>
@ -79,7 +79,7 @@ const PageWrap = props => {
</List> </List>
<List> <List>
<ListItem title={_t.textMoveWithText} className={'inline' === wrapType ? 'disabled' : ''}> <ListItem title={_t.textMoveWithText} className={'inline' === wrapType ? 'disabled' : ''}>
<Toggle checked={moveText} onToggleChange={() => {props.onWrapMoveText(!moveText)}}/> <Toggle checked={moveText} onChange={() => {props.onWrapMoveText(!moveText)}}/>
</ListItem> </ListItem>
</List> </List>
{ {
@ -189,24 +189,24 @@ const PageStyleOptions = props => {
<Navbar title={_t.textOptions} backLink={_t.textBack}/> <Navbar title={_t.textOptions} backLink={_t.textBack}/>
<List> <List>
<ListItem title={_t.textHeaderRow}> <ListItem title={_t.textHeaderRow}>
<Toggle checked={isFirstRow} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 0, !isFirstRow)}}/> <Toggle checked={isFirstRow} onChange={() => {props.onCheckTemplateChange(tableLook, 0, !isFirstRow)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textTotalRow}> <ListItem title={_t.textTotalRow}>
<Toggle checked={isLastRow} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 1, !isLastRow)}}/> <Toggle checked={isLastRow} onChange={() => {props.onCheckTemplateChange(tableLook, 1, !isLastRow)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textBandedRow}> <ListItem title={_t.textBandedRow}>
<Toggle checked={isBandHor} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 2, !isBandHor)}}/> <Toggle checked={isBandHor} onChange={() => {props.onCheckTemplateChange(tableLook, 2, !isBandHor)}}/>
</ListItem> </ListItem>
</List> </List>
<List> <List>
<ListItem title={_t.textFirstColumn}> <ListItem title={_t.textFirstColumn}>
<Toggle checked={isFirstCol} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 3, !isFirstCol)}}/> <Toggle checked={isFirstCol} onChange={() => {props.onCheckTemplateChange(tableLook, 3, !isFirstCol)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textLastColumn}> <ListItem title={_t.textLastColumn}>
<Toggle checked={isLastCol} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 4, !isLastCol)}}/> <Toggle checked={isLastCol} onChange={() => {props.onCheckTemplateChange(tableLook, 4, !isLastCol)}}/>
</ListItem> </ListItem>
<ListItem title={_t.textBandedColumn}> <ListItem title={_t.textBandedColumn}>
<Toggle checked={isBandVer} onToggleChange={() => {props.onCheckTemplateChange(tableLook, 5, !isBandVer)}}/> <Toggle checked={isBandVer} onChange={() => {props.onCheckTemplateChange(tableLook, 5, !isBandVer)}}/>
</ListItem> </ListItem>
</List> </List>
</Page> </Page>