mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +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 (
|
||||
<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}>
|
||||
<ConditionallyRender
|
||||
condition={variant.payload}
|
||||
@ -43,7 +48,9 @@ const FeatureVariantListItem = ({
|
||||
}
|
||||
/>
|
||||
</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'}>
|
||||
{variant.weightType === FIX ? 'Fix' : 'Variable'}
|
||||
</TableCell>
|
||||
@ -52,13 +59,22 @@ const FeatureVariantListItem = ({
|
||||
show={
|
||||
<TableCell className={styles.actions}>
|
||||
<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 />
|
||||
</IconButton>
|
||||
<IconButton data-test={`VARIANT_DELETE_BUTTON_${variant.name}`} onClick={e => {
|
||||
e.stopPropagation();
|
||||
setDelDialog({show: true, name: variant.name });
|
||||
}}>
|
||||
<IconButton
|
||||
data-test={`VARIANT_DELETE_BUTTON_${variant.name}`}
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
setDelDialog({
|
||||
show: true,
|
||||
name: variant.name,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<Delete />
|
||||
</IconButton>
|
||||
</div>
|
||||
@ -67,7 +83,6 @@ const FeatureVariantListItem = ({
|
||||
elseShow={<TableCell className={styles.actions} />}
|
||||
/>
|
||||
</TableRow>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user