TreeView v1

This commit is contained in:
david 2024-11-06 22:12:37 +01:00
parent d1294c2fc4
commit e9743cd00c
6 changed files with 148 additions and 50 deletions

View file

@ -0,0 +1,13 @@
import { Controller } from "@hotwired/stimulus"
import * as bootstrap from 'bootstrap'
// Connects to data-controller="bs-scrollspy"
export default class extends Controller {
connect() {
// console.log(this.element)
const target = this.element.getAttribute("data-bs-scrollspy-target")
const scrollSpy = new bootstrap.ScrollSpy(this.element, {
target: target
})
}
}

View file

@ -7,6 +7,9 @@ import { application } from "./application"
import AutosubmitController from "./autosubmit_controller"
application.register("autosubmit", AutosubmitController)
import BsScrollspyController from "./bs_scrollspy_controller"
application.register("bs-scrollspy", BsScrollspyController)
import CheckLinkController from "./check_link_controller"
application.register("check-link", CheckLinkController)