fix: Database List Sorted (#15619)

* sorted the database list

* revisions

* cloned the array

* one more time with feeling

* added documentation link as well
This commit is contained in:
AAfghahi
2021-07-09 16:06:17 -04:00
committed by GitHub
parent 600473ff72
commit faf6fcd83e
3 changed files with 6 additions and 5 deletions

View File

@@ -559,7 +559,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
onChange={setDatabaseModel}
placeholder="Choose a database..."
>
{availableDbs?.databases
{[...(availableDbs?.databases || [])]
?.sort((a: DatabaseForm, b: DatabaseForm) =>
a.name.localeCompare(b.name),
)