mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
hide display type toggle if only one available
This commit is contained in:
@@ -132,30 +132,32 @@ export const ListConfigMenu = (props: ListConfigMenuProps) => {
|
|||||||
title={t('common.configure', { postProcess: 'sentenceCase' })}
|
title={t('common.configure', { postProcess: 'sentenceCase' })}
|
||||||
>
|
>
|
||||||
<Stack gap="xs">
|
<Stack gap="xs">
|
||||||
<ListConfigTable
|
{availableDisplayTypes.length > 1 && (
|
||||||
options={[
|
<ListConfigTable
|
||||||
{
|
options={[
|
||||||
component: (
|
{
|
||||||
<SegmentedControl
|
component: (
|
||||||
data={availableDisplayTypes}
|
<SegmentedControl
|
||||||
fullWidth
|
data={availableDisplayTypes}
|
||||||
onChange={(value) => {
|
fullWidth
|
||||||
setList(props.listKey, {
|
onChange={(value) => {
|
||||||
display: value as ListDisplayType,
|
setList(props.listKey, {
|
||||||
});
|
display: value as ListDisplayType,
|
||||||
}}
|
});
|
||||||
size="sm"
|
}}
|
||||||
value={displayType}
|
size="sm"
|
||||||
withItemsBorders={false}
|
value={displayType}
|
||||||
/>
|
withItemsBorders={false}
|
||||||
),
|
/>
|
||||||
id: 'displayType',
|
),
|
||||||
label: t('table.config.general.displayType', {
|
id: 'displayType',
|
||||||
postProcess: 'sentenceCase',
|
label: t('table.config.general.displayType', {
|
||||||
}),
|
postProcess: 'sentenceCase',
|
||||||
},
|
}),
|
||||||
]}
|
},
|
||||||
/>
|
]}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<Config displayType={displayType} {...props} />
|
<Config displayType={displayType} {...props} />
|
||||||
</Stack>
|
</Stack>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
Reference in New Issue
Block a user