Skip to content

Commit

Permalink
fix(project): collections search is asynchronous
Browse files Browse the repository at this point in the history
Make the collections search, in the popup collections modal, asynchronous. This fixes a bug where search results were not correctly synchronised to the stored search term (in component state.)
  • Loading branch information
eatyourgreens committed Jun 10, 2024
1 parent 9a7a630 commit 485ceef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ function SelectCollection ({
For shorter strings, we request all your collections then filter the display names.
*/

function onTextChange(text) {
async function onTextChange(text) {
const search = text.trim()
onSearch({
await onSearch({
favorite: false,
current_user_roles: 'owner,collaborator,contributor',
search: search.length > 3 ? search : undefined
Expand Down

0 comments on commit 485ceef

Please sign in to comment.