Merge branch 'MDL-85007-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE
This commit is contained in:
Vendored
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user