UNPKG

koval-ui

Version:

React components collection with minimalistic design. Supports theming, layout, and input validation.

26 lines (25 loc) 608 B
"use client"; import { useMemo as o, useState as r, useEffect as f } from "react"; import { ROW_SELECTION_ID as u } from "../columns/rowSelection.js"; const m = {}, c = (n, t) => { const e = t?.right ? t?.right : [], s = t?.left ? t?.left : []; return { right: e, left: n ? [u, ...s] : s }; }, a = ({ columnPinningProp: n = m, hasSelectableColumn: t }) => { const e = o( () => c(t, n), [n, t] ), [s, i] = r(e); return f(() => { i(e); }, [e]), { columnPinning: s, setColumnPinning: i }; }; export { a as useColumnPinning }; //# sourceMappingURL=useColumnPinning.js.map