Skip to content

Commit

Permalink
fix: existing stickiness value should be available in the dropdown (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
andreas-unleash committed Jul 13, 2023
1 parent bfa2084 commit 846a62e
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -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;
};

Expand Down

0 comments on commit 846a62e

Please sign in to comment.