UNPKG

react-kanban-kit

Version:

A flexible and customizable Kanban board component for React applications, built with TypeScript and modern drag-and-drop functionality powered by Atlassian's pragmatic-drag-and-drop.

30 lines (29 loc) 712 B
import { withPrefix } from "./getPrefix.es.js"; const handleScroll = (e, virtualization, onScroll, column) => { const scrollContainer = document.querySelector(`.${withPrefix("column-content-list")}`); if (!scrollContainer) return; const { scrollHeight, clientHeight } = scrollContainer; let offset; if (virtualization) { offset = typeof e === "number" ? e : 0; } else { const target = e.target; offset = target.scrollTop; } const syntheticEvent = { target: { scrollTop: offset, scrollHeight, clientHeight } }; onScroll == null ? void 0 : onScroll(syntheticEvent, column); }; export { handleScroll }; //# sourceMappingURL=scroll.es.js.map