Track and clear setTimeout in ConformanceSidebar watch on unmount
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -394,8 +394,10 @@ watch(isSubmittedData, (newValue) => {
|
||||
});
|
||||
|
||||
// When opening a rule file, display the saved options, rules, and time
|
||||
let reportWatchTimerId = null;
|
||||
watch(conformanceTempReportData, (newValue) => {
|
||||
setTimeout(() => {
|
||||
if (reportWatchTimerId) clearTimeout(reportWatchTimerId);
|
||||
reportWatchTimerId = setTimeout(() => {
|
||||
if (newValue !== null) {
|
||||
const rule = newValue.rule;
|
||||
|
||||
@@ -1722,6 +1724,7 @@ emitter.on("isRadioActSeqFromToChange", (data) => {
|
||||
|
||||
// beforeUnmount
|
||||
onBeforeUnmount(() => {
|
||||
if (reportWatchTimerId) clearTimeout(reportWatchTimerId);
|
||||
isSubmitReset();
|
||||
selectTimeReset();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user