Skip to content

Commit fc6fe83

Browse files
committed
Fix: regions jumping around on Firefox
1 parent 678877a commit fc6fe83

File tree

1 file changed

+8
-6
lines changed
  • src/routes/(console)/organization-[organization]/wizard

1 file changed

+8
-6
lines changed

src/routes/(console)/organization-[organization]/wizard/step2.svelte

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@
6262
}
6363
6464
$: notifications = prefs?.notifications ?? [];
65+
66+
const sortedRegions = $regions.regions.sort((regionA, regionB) => {
67+
if (regionA.disabled >= regionB.disabled) {
68+
return 1;
69+
}
70+
return -1;
71+
});
6572
</script>
6673

6774
<WizardStep>
@@ -73,12 +80,7 @@
7380
<ul
7481
class="grid-box u-margin-block-start-16"
7582
style="--p-grid-item-size:12em; --p-grid-item-size-small-screens:12rem; --grid-gap: 1rem;">
76-
{#each $regions.regions.sort((regionA, regionB) => {
77-
if (regionA.disabled >= regionB.disabled) {
78-
return 1;
79-
}
80-
return -1;
81-
}) as region, index (region.$id)}
83+
{#each sortedRegions as region, index (region.$id)}
8284
<li>
8385
<RegionCard
8486
name="region"

0 commit comments

Comments
 (0)