[Patcher > ContextMenu] Fix force re-render after checkbox actions

pull/67/head
CanadaHonk 2 years ago committed by GitHub
parent cc0794f006
commit 7cf4e4e73c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -61,7 +61,7 @@ const generateElement = (itemProps, _subItems, wantedNavId, type, extraInfo, { M
itemProps.checked = !itemProps.checked;
item.props.checked = itemProps.checked; // Update the actual current item's props too
getOwnerInstance(document.getElementById(`${wantedNavId}-${itemProps.id}`)).props.onMouseEnter(); // And make it re-render
getOwnerInstance(document.querySelector(`[id^="${wantedNavId}-"][id*="${itemProps.id}"]`)).props.onMouseEnter(); // And make it re-render
return itemProps.originalAction(arguments, extraInfo, itemProps.checked);
}
@ -133,4 +133,4 @@ export const remove = (label) => {
uninjectors[id]();
return true;
};
};

Loading…
Cancel
Save