Refetch initial data instead of refreshing
This commit is contained in:
parent
89afec9bfc
commit
e91f9ea5cd
|
@ -95,7 +95,6 @@
|
||||||
$: page = $searchUsersPageInfo.page
|
$: page = $searchUsersPageInfo.page
|
||||||
$: searchUsers(page, searchTerm)
|
$: searchUsers(page, searchTerm)
|
||||||
$: group = $groups.find(x => x._id === groupId)
|
$: group = $groups.find(x => x._id === groupId)
|
||||||
$: filtered = $users.data
|
|
||||||
$: groupApps = $apps
|
$: groupApps = $apps
|
||||||
.filter(app =>
|
.filter(app =>
|
||||||
groups.actions
|
groups.actions
|
||||||
|
@ -151,7 +150,7 @@
|
||||||
|
|
||||||
const removeUser = async id => {
|
const removeUser = async id => {
|
||||||
await groups.actions.removeUser(groupId, id)
|
await groups.actions.removeUser(groupId, id)
|
||||||
fetchGroupUsers.refresh()
|
fetchGroupUsers.getInitialData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const removeApp = async app => {
|
const removeApp = async app => {
|
||||||
|
@ -221,11 +220,11 @@
|
||||||
list={$users.data}
|
list={$users.data}
|
||||||
on:select={async e => {
|
on:select={async e => {
|
||||||
await groups.actions.addUser(groupId, e.detail)
|
await groups.actions.addUser(groupId, e.detail)
|
||||||
fetchGroupUsers.refresh()
|
fetchGroupUsers.getInitialData()
|
||||||
}}
|
}}
|
||||||
on:deselect={async e => {
|
on:deselect={async e => {
|
||||||
await groups.actions.removeUser(groupId, e.detail)
|
await groups.actions.removeUser(groupId, e.detail)
|
||||||
fetchGroupUsers.refresh()
|
fetchGroupUsers.getInitialData()
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
Loading…
Reference in New Issue