mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
Merge pull request #525 from Unleash/fix/variant-list-popup
Fix variant list
This commit is contained in:
commit
00b9a6c38d
@ -23,7 +23,12 @@ const FeatureVariantListItem = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell onClick={editVariant} data-test={'VARIANT_NAME'}>{variant.name}</TableCell>
|
<TableCell
|
||||||
|
onClick={() => editVariant(variant.name)}
|
||||||
|
data-test={'VARIANT_NAME'}
|
||||||
|
>
|
||||||
|
{variant.name}
|
||||||
|
</TableCell>
|
||||||
<TableCell className={styles.chipContainer}>
|
<TableCell className={styles.chipContainer}>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={variant.payload}
|
condition={variant.payload}
|
||||||
@ -43,7 +48,9 @@ const FeatureVariantListItem = ({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell data-test={'VARIANT_WEIGHT'}>{variant.weight / 10.0} %</TableCell>
|
<TableCell data-test={'VARIANT_WEIGHT'}>
|
||||||
|
{variant.weight / 10.0} %
|
||||||
|
</TableCell>
|
||||||
<TableCell data-test={'VARIANT_WEIGHT_TYPE'}>
|
<TableCell data-test={'VARIANT_WEIGHT_TYPE'}>
|
||||||
{variant.weightType === FIX ? 'Fix' : 'Variable'}
|
{variant.weightType === FIX ? 'Fix' : 'Variable'}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
@ -52,13 +59,22 @@ const FeatureVariantListItem = ({
|
|||||||
show={
|
show={
|
||||||
<TableCell className={styles.actions}>
|
<TableCell className={styles.actions}>
|
||||||
<div className={styles.actionsContainer}>
|
<div className={styles.actionsContainer}>
|
||||||
<IconButton data-test={'VARIANT_EDIT_BUTTON'} onClick={() => editVariant(variant.name)}>
|
<IconButton
|
||||||
|
data-test={'VARIANT_EDIT_BUTTON'}
|
||||||
|
onClick={() => editVariant(variant.name)}
|
||||||
|
>
|
||||||
<Edit />
|
<Edit />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<IconButton data-test={`VARIANT_DELETE_BUTTON_${variant.name}`} onClick={e => {
|
<IconButton
|
||||||
e.stopPropagation();
|
data-test={`VARIANT_DELETE_BUTTON_${variant.name}`}
|
||||||
setDelDialog({show: true, name: variant.name });
|
onClick={e => {
|
||||||
}}>
|
e.stopPropagation();
|
||||||
|
setDelDialog({
|
||||||
|
show: true,
|
||||||
|
name: variant.name,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Delete />
|
<Delete />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</div>
|
</div>
|
||||||
@ -67,7 +83,6 @@ const FeatureVariantListItem = ({
|
|||||||
elseShow={<TableCell className={styles.actions} />}
|
elseShow={<TableCell className={styles.actions} />}
|
||||||
/>
|
/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user