Skip to content

Commit

Permalink
chore: minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
hetunandu committed Jan 30, 2025
1 parent f99d932 commit b7319e7
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,18 @@ export function PeekOverlayPopUpContent(
configTree,
);

const jsData = useMemo(
const [jsData, dataType] = useMemo(
// Because getPropertyData can return a function
// And we don't want to execute it.
() => getPropertyData(filteredData, propertyPath),
() => {
const jsData = getPropertyData(filteredData, propertyPath);
const dataType = getDataTypeHeader(jsData);

return [jsData, dataType];
},
[filteredData, propertyPath],
);

const dataType = useMemo(() => getDataTypeHeader(jsData), [jsData]);

const debouncedHide = debounce(hidePeekOverlay, PEEK_OVERLAY_DELAY);

const getPositionValues = useCallback(() => {
Expand Down

0 comments on commit b7319e7

Please sign in to comment.