fix: admin/accounts: selection is inconsistent after reload
Massimo Melina committed
Feb 10, 2022 at 12:34 UTC
c04e0778c2b83544b80b398e6d9256531a60d576
1 file changed
+2
-1
admin/src/AccountsPage.ts
+2
-1
@@ -61,7 +61,7 @@ export default function AccountsPage() {
61
disabled: !sel.length,
62
startIcon: h(Delete),
63
async onClick(){
64
- if (!await confirmDialog(`You are going to delete ${sel.length} accounts`))
64
+ if (!await confirmDialog(`You are going to delete ${sel.length} account(s)`))
65
return
66
const errors = onlyTruthy(await Promise.all(sel.map(username =>
67
apiCall('del_account', { username }).then(() => null, () => username) )))
@@ -77,6 +77,7 @@ export default function AccountsPage() {
77
h(TreeView, {
78
multiSelect: true,
79
sx: { pr: 4, minWidth: '15em' },
80
+ selected: sel,
81
onNodeSelect(ev, ids) {
82
setAdd(false)
83
setSel(ids)