feat(StorePage): add resetPagination function to reset page index and page size when changing tabs

This commit is contained in:
cristhianzl 2023-11-30 17:38:54 -03:00
commit 7bfce4cd1d

View file

@ -157,6 +157,11 @@ export default function StorePage(): JSX.Element {
setTabId("");
}, []);
function resetPagination() {
setPageIndex(1);
setPageSize(12);
}
return (
<PageLayout
title="Langflow Store"
@ -230,6 +235,7 @@ export default function StorePage(): JSX.Element {
<button
disabled={loading}
onClick={() => {
resetPagination();
setTabActive("Flows");
}}
className={
@ -244,6 +250,7 @@ export default function StorePage(): JSX.Element {
<button
disabled={loading}
onClick={() => {
resetPagination();
setTabActive("Components");
}}
className={