1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: existing stickiness value should be available in the dropdown (#4228)

existing stickiness value should be available in the dropdown even if
the context field is no longer sticky

Before: if the context field is no longer sticky
![Screenshot 2023-07-13 at 09 50
55](https://github.com/Unleash/unleash/assets/104830839/6a8afa86-7bd3-45e6-bddf-69306f02bf56)

After
![Screenshot 2023-07-13 at 09 48
53](https://github.com/Unleash/unleash/assets/104830839/e301e1ff-7624-437c-af02-9e293cae4911)

Closes #
[1-1115](https://linear.app/unleash/issue/1-1115/current-gradual-rollout-stickiness-configurations-should-take-priority)

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2023-07-13 10:20:16 +03:00 committed by GitHub
parent bfa20849e9
commit 846a62ecec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,11 @@ export const StickinessSelect = ({
options.push({ key: 'random', label: 'random' });
}
// Add existing value to the options
if (value && !options.find(option => option.key === value)) {
options.push({ key: value, label: value });
}
return options;
};