Fix invalid marking of done nodes
This commit is contained in:
@ -53,7 +53,7 @@ export function ContentDrawer(props: ContentDrawerProps) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
localStorage.setItem(groupId, 'done');
|
localStorage.setItem(groupId, 'done');
|
||||||
document
|
document
|
||||||
.querySelectorAll(`[data-group-id*="-${groupId}"]`)
|
.querySelectorAll(`[data-group-id$="-${groupId}"]`)
|
||||||
.forEach((item) => item?.classList?.add('done'));
|
.forEach((item) => item?.classList?.add('done'));
|
||||||
onClose();
|
onClose();
|
||||||
}}
|
}}
|
||||||
@ -76,7 +76,7 @@ export function ContentDrawer(props: ContentDrawerProps) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
localStorage.removeItem(groupId);
|
localStorage.removeItem(groupId);
|
||||||
document
|
document
|
||||||
.querySelectorAll(`[data-group-id*="-${groupId}"]`)
|
.querySelectorAll(`[data-group-id$="-${groupId}"]`)
|
||||||
.forEach((item) => item?.classList?.remove('done'));
|
.forEach((item) => item?.classList?.remove('done'));
|
||||||
onClose();
|
onClose();
|
||||||
}}
|
}}
|
||||||
|
Reference in New Issue
Block a user