if (pageCount > 1) {
const newPagination = document.createElement("div");
newPagination.className = "paginationBottom jsPagination";
- DomUtil.replaceElement(
- UiDialog.getDialog(this)!.content.querySelector(".jsPagination") as HTMLElement,
- newPagination,
- );
+
+ const oldPagination = UiDialog.getDialog(this)!.content.querySelector(".jsPagination") as HTMLElement;
+ oldPagination.insertAdjacentElement("beforebegin", newPagination);
+ oldPagination.remove();
this._pagination = new UiPagination(newPagination, {
activePage: pageNo,
if (pageCount > 1) {
const newPagination = document.createElement("div");
newPagination.className = "paginationBottom jsPagination";
- DomUtil.replaceElement(UiDialog.getDialog(this).content.querySelector(".jsPagination"), newPagination);
+ const oldPagination = UiDialog.getDialog(this).content.querySelector(".jsPagination");
+ oldPagination.insertAdjacentElement("beforebegin", newPagination);
+ oldPagination.remove();
this._pagination = new Pagination_1.default(newPagination, {
activePage: pageNo,
callbackSwitch: (pageNo) => this._search.search(pageNo),