Skip to content

Commit

Permalink
Merge pull request #749 from appwrite/fix-targets-modal-accordion
Browse files Browse the repository at this point in the history
Reset targets accordion when changing pages
  • Loading branch information
TorstenDittmann authored Jan 30, 2024
2 parents c3907e4 + a98e586 commit c59c8ba
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
let search = '';
let offset = 0;
let totalResults = 0;
let userResultsById: Record<
string,
Models.User<Record<string, unknown>>
> = {}; // use a hash map so we can quickly look up a user by id
let userResultsById: Record<string, Models.User<Record<string, unknown>>> = {}; // use a hash map so we can quickly look up a user by id
let selected: Record<string, Models.Target> = {};
let hasSelection = false;
Expand Down Expand Up @@ -147,7 +144,7 @@
bind:value={search} />
{#if Object.keys(userResultsById).length > 0}
<Collapsible>
{#each Object.entries(userResultsById) as [userId, user]}
{#each Object.entries(userResultsById) as [userId, user] (userId)}
{@const selectedCount = user.targets.filter(
(target) => selected[target.$id]
).length}
Expand Down

0 comments on commit c59c8ba

Please sign in to comment.