UNPKG

koval-ui

Version:

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

3 lines (2 loc) 575 B
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),d=require("../columns/rowSelection.cjs"),C={},h=(s,t)=>{const e=t!=null&&t.right?t==null?void 0:t.right:[],f=t!=null&&t.left?t==null?void 0:t.left:[];return{right:e,left:s?[d.ROW_SELECTION_ID,...f]:f}},E=({columnPinningProp:s=C,hasSelectableColumn:t})=>{const e=a.useMemo(()=>h(t,s),[s,t]),[f,S]=a.useState(e);return a.useEffect(()=>{S(e)},[e]),{columnPinning:f,setColumnPinning:S}};exports.useColumnPinning=E; //# sourceMappingURL=useColumnPinning.cjs.map