Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed May 9, 2023
1 parent 1f590c7 commit ec354d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/jsapi-components/src/useInitializeViewportData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import useTableSize from './useTableSize';
* source table. This is intended for "human" sized tables such as those used in
* admin panels. This is not suitable for "machine" scale with millions+ rows.
* @param table The table that will be used to determine the list size.
* @returns
* @returns a React Stately ListData object. Note that this object is recreated
* by React Stately on every render.
*/
export default function useInitializeViewportData<T>(
table: Table | TreeTable | null
Expand Down
5 changes: 4 additions & 1 deletion packages/jsapi-components/src/useViewportData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export interface UseViewportDataResult<
* @param table
* @param viewportSize
* @param viewportPadding
* @returns An object for managing Table viewport state.
* @returns An object for managing Table viewport state. Note that the returned
* object changes on every render due to the `viewportData` not being memoized.
* This is due to the underlying React Stately `useListData` implementation that
* also changes its returned object on every render.
*/
export default function useViewportData<
TItem,
Expand Down

0 comments on commit ec354d4

Please sign in to comment.