Merge branch 'MDL-85007-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE

This commit is contained in:
Jake Dallimore
2025-03-26 11:32:26 +08:00
3 changed files with 6 additions and 7 deletions
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3 -4
View File
@@ -26,6 +26,7 @@ import Pending from 'core/pending';
import {addIconToContainer} from 'core/loadingicon';
import {fetch as fetchTableData} from 'core_table/local/dynamic/repository';
import Notification from 'core/notification';
import {replaceNode} from 'core/templates';
let watching = false;
@@ -89,12 +90,10 @@ export const refreshTableContent = (tableRoot, resetContent = false) => {
resetContent,
)
.then(data => {
const placeholder = document.createElement('div');
placeholder.innerHTML = data.html;
tableRoot.replaceWith(...placeholder.childNodes);
const tableRootReplacement = replaceNode(tableRoot, data.html, '');
// Update the tableRoot.
return getTableFromId(tableRoot.dataset.tableUniqueid);
return tableRootReplacement[0];
}).then(tableRoot => {
tableRoot.dispatchEvent(new CustomEvent(Events.tableContentRefreshed, {
bubbles: true,