MDL-71817 calendar: Use root node to find the target elements

Instead of passing querying for the root element again by its ID
which changed in this issue, use the already existing root element
at the beginning of this Mustache JS code. It also makes maintenance
simpler in the future.
This commit is contained in:
Jun Pataleta 2021-07-22 17:25:41 +08:00
parent 68bd3a1158
commit 68fa468885

View File

@ -166,7 +166,7 @@ require([
M.util.js_pending("month-detailed-{{uniqid}}-filterChanged");
// A filter value has been changed.
// Find all matching cells in the popover data, and hide them.
var target = $("#month-detailed-{{uniqid}}").find(CalendarSelectors.eventType[data.type]);
var target = root.find(CalendarSelectors.eventType[data.type]);
var transitionPromise = $.Deferred();
if (data.hidden) {