Skip to content

Commit

Permalink
fix: Project Dropdown selector is not sorted alphabetically (#2812)
Browse files Browse the repository at this point in the history
  • Loading branch information
novakzaballa authored Sep 29, 2023
1 parent 3ec2f6b commit 7123cf6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/common/stores/account-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const Dispatcher = require('../dispatcher/dispatcher')
const BaseStore = require('./base/_store')
const data = require('../data/base/_data')
import Constants from 'common/constants'
import { sortBy } from 'lodash'

const controller = {
acceptInvite: (id) => {
Expand Down Expand Up @@ -275,6 +276,10 @@ const controller = {

setUser(user) {
if (user) {
const sortedOrganisations = sortBy(user.organisations, (v) => {
return v.name
})
user.organisations = sortedOrganisations
store.model = user
if (user && user.organisations) {
store.organisation = user.organisations[0]
Expand Down

3 comments on commit 7123cf6

@vercel
Copy link

@vercel vercel bot commented on 7123cf6 Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 7123cf6 Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 7123cf6 Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./docs

docs.bullet-train.io
docs-git-main-flagsmith.vercel.app
docs-flagsmith.vercel.app
docs.flagsmith.com

Please sign in to comment.