Skip to content

Commit 853995b

Browse files
triv: fix tabulator htmx process, remove poper import, added fix for modal inside modal
1 parent 529cb2e commit 853995b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/django_smartbase_admin/static/sb_admin/src/js/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ import Dropdown from 'bootstrap/js/dist/dropdown'
22
import Collapse from 'bootstrap/js/dist/collapse'
33
import Tab from 'bootstrap/js/dist/tab'
44
import Modal from 'bootstrap/js/dist/modal'
5-
// eslint-disable-next-line no-unused-vars
6-
import Popper from '@popperjs/core'
75
import Tooltip from 'bootstrap/js/dist/tooltip'
86

7+
// remove Modal focus trap to fix interaction with fields in modals inside another modal
8+
Modal.prototype._initializeFocusTrap = function () { return { activate: function () { }, deactivate: function () { } } }
9+
910
window.bootstrap5 = {
1011
Modal: Modal,
1112
Tooltip: Tooltip,

src/django_smartbase_admin/static/sb_admin/src/js/table.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ class SBAdminTable {
9696
}
9797

9898
loadFromUrlAfterInit() {
99+
window.htmx.process(this.tabulator.rowManager.tableElement)
99100
this.tabulator.on("dataProcessed", () => {
100101
window.htmx.process(this.tabulator.rowManager.tableElement)
101102
})

0 commit comments

Comments
 (0)