import { useEffect, useState } from 'react'; import type { FiltersMap } from '@wix/bex-core'; import type { EditableTableProps } from './EditableTable'; export function useEditableTableCollectionSyncProps( props: EditableTableProps, ) { const { state, columns, fieldsSource } = props; useState(() => fieldsSource?.setOnTable(state.toolbar)); useEffect(() => state.init(columns), [state, columns]); }