Skip to content

Commit 90bd24b

Browse files
authored
Merge pull request #2477 from RedisInsight/fe/bugfix/RI-4857_default_region_preselected_tf
#RI-4857 - [FE] Triggers and functions region not preselected by default
2 parents 1363672 + 6ff3b0d commit 90bd24b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ const OAuthSelectPlan = () => {
6767
return
6868
}
6969

70-
const defaultRegion = isTFSource ? first(tfProviderRegions) || DEFAULT_REGION : DEFAULT_REGION
70+
const defaultRegions = isTFSource ? tfProviderRegions || [DEFAULT_REGION] : [DEFAULT_REGION]
7171

7272
const filteredPlans = filter(plansInit, { provider: providerSelected })
7373
.sort((a, b) => (a?.details?.displayOrder || 0) - (b?.details?.displayOrder || 0))
7474

75-
const defaultPlan = filteredPlans.find(({ region }) => region === defaultRegion)
75+
const defaultPlan = filteredPlans.find(({ region = '' }) => defaultRegions?.includes(region))
7676

7777
const planId = (defaultPlan || first(filteredPlans) || {}).id?.toString() || ''
7878

0 commit comments

Comments
 (0)