From e5eff9827a16855c22fe727cf54ca3d9475d8dec Mon Sep 17 00:00:00 2001 From: PhilReact Date: Sat, 15 Mar 2025 15:57:33 +0200 Subject: [PATCH] change params to search --- package.json | 2 +- src/components/ResourceList/ResourceListDisplay.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 04463d9..1f582c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "qapp-core", - "version": "1.0.3", + "version": "1.0.4", "description": "Qortal's core React library with global state, UI components, and utilities", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/src/components/ResourceList/ResourceListDisplay.tsx b/src/components/ResourceList/ResourceListDisplay.tsx index dca7dde..dcd1c19 100644 --- a/src/components/ResourceList/ResourceListDisplay.tsx +++ b/src/components/ResourceList/ResourceListDisplay.tsx @@ -45,7 +45,7 @@ interface DefaultLoaderParams { } interface BaseProps { - params: QortalSearchParams; + search: QortalSearchParams; listItem: (item: ListItem, index: number) => React.ReactNode; styles?: ResourceListStyles; loaderItem?: (status: "LOADING" | "ERROR") => React.ReactNode; @@ -73,7 +73,7 @@ interface NonVirtualizedProps extends BaseProps { type PropsResourceListDisplay = VirtualizedProps | NonVirtualizedProps; export const MemorizedComponent = ({ - params, + search, listItem, styles = { gap: 1, @@ -91,7 +91,7 @@ export const MemorizedComponent = ({ const { fetchResources } = useResources(); const { getTemporaryResources, filterOutDeletedResources } = useCacheStore(); const [isLoading, setIsLoading] = useState(false); - const memoizedParams = useMemo(() => JSON.stringify(params), [params]); + const memoizedParams = useMemo(() => JSON.stringify(search), [search]); const addList = useListStore().addList const addItems = useListStore().addItems const getListByName = useListStore().getListByName @@ -315,7 +315,7 @@ function arePropsEqual( prevProps.disableVirtualization === nextProps.disableVirtualization && prevProps.direction === nextProps.direction && prevProps.onSeenLastItem === nextProps.onSeenLastItem && - JSON.stringify(prevProps.params) === JSON.stringify(nextProps.params) && + JSON.stringify(prevProps.search) === JSON.stringify(nextProps.search) && JSON.stringify(prevProps.styles) === JSON.stringify(nextProps.styles) ); }