fix: checkbox right click

fix/check
Arik Chakma 5 months ago
parent cae841b898
commit 83388f07b6
  1. 17
      src/components/FrameRenderer/renderer.ts

@ -190,14 +190,25 @@ export class Renderer {
e.preventDefault(); e.preventDefault();
const isCurrentStatusDone = targetGroup.classList.contains('done'); const isCurrentStatusDone = targetGroup.classList.contains('done');
const normalizedGroupId = groupId const normalizedGroupId = groupId.replace(/^\d+-/, '');
.replace(/^\d+-/, '')
.replace('check:', '');
if (normalizedGroupId.startsWith('ext_link:')) { if (normalizedGroupId.startsWith('ext_link:')) {
return; return;
} }
if (/^check:/.test(groupId)) {
window.dispatchEvent(
new CustomEvent(`${this.resourceType}.topic.toggle`, {
detail: {
topicId: groupId.replace('check:', ''),
resourceType: this.resourceType,
resourceId: this.resourceId,
},
}),
);
return;
}
this.updateTopicStatus( this.updateTopicStatus(
normalizedGroupId, normalizedGroupId,
!isCurrentStatusDone ? 'done' : 'pending', !isCurrentStatusDone ? 'done' : 'pending',

Loading…
Cancel
Save