A package for building tree structures from Postgres ltree data. Version 1.5.28 provides a Classifier class that renders interactive, draggable tree lists in the browser. It requires Bootstrap and is ESM-only. Key differentiators: tight integration with Postgres ltree paths, built-in CRUD operations via configurable URLs, drag-and-drop support, and a modal form for editing. The project appears to be actively maintained with regular releases.
npm install flat-tree-builderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import the Classifier, include required CSS, and instantiate it with configuration options.
Use ES module imports (import) instead of require(). Ensure your project or script is set up for ESM.
Pass a query selector string like '#test' or '.classifier', not document.getElementById('test').Always provide at least the 'getUrl' option when not using test mode.
Add a Bootstrap CSS link in your HTML (e.g., from node_modules or CDN).
Use: import Classifier from 'flat-tree-builder'
Switch to ES module imports: import Classifier from 'flat-tree-builder'
Pass a valid CSS selector string (e.g., '#myId') and ensure the element exists in the DOM.