UNPKG

@velis/dynamicforms

Version:

Data entry boilerplate components and a RESTful API consumer

18 lines 957 B
/** * rows visibility observer * determines what rows are currently visible in tbody and fires a callback when necessary * * uses IntersectionObserver to do its magic * falls back on (relatively cheaply made) polling when observer isn't supported * * Actually, that's incorrect: TODO: IntersectionObserver is currently not used because it was much slower than polling * See also tbody-generic which used the observer if you ever make it more performant * also re-add "resize-observer-polyfill": "^1.5.1", to dependencies in package.json * * This mixin is intended to be used in tbody. it expects the root element to be the parent div with items as rows */ import { ComputedRef, Ref } from 'vue'; import TableRows from './definitions/rows'; declare function useRowVisibilityObserver(element: Ref<HTMLElement>, rows: ComputedRef<TableRows>): null; export default useRowVisibilityObserver; //# sourceMappingURL=rows-visibility-observer.d.ts.map