UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

36 lines (35 loc) 707 B
import { useState as s, useEffect as R, useCallback as S } from "react"; import { cloneDeep as a } from "lodash-es"; function N(e, o, r) { const [l, c] = s({}), [u, i] = s( a(e) ), [E, m] = s(""), [w, f] = s([]); R(() => { i(a(e)); }, [e]); const n = S( (t) => { m(t), o && o(t); }, [o] ), I = S( (t) => { c({}), i(t), r && r(t), f([]), n(""); }, [r, n] ); return { rowSelection: l, setRowSelection: c, refsInState: u, setRefsInState: I, newEntityIDs: E, setNewEntityIDs: n, parseErrors: w, setParseErrors: f }; } export { N as useEntityHeaderTableState }; //# sourceMappingURL=useEntityHeaderTableState.js.map