Procházet zdrojové kódy

no message

MergeProblem1
Tommy\2Fi-Staff před 2 dny
rodič
revize
e6afcf40cc
2 změnil soubory, kde provedl 7 přidání a 1 odebrání
  1. +6
    -1
      src/components/SearchResults/SearchResults.tsx
  2. +1
    -0
      src/components/Shop/Shop.tsx

+ 6
- 1
src/components/SearchResults/SearchResults.tsx Zobrazit soubor

@@ -6,6 +6,7 @@ import React, {
MouseEvent,
SetStateAction,
useCallback,
useEffect,
useMemo,
useState,
} from "react";
@@ -201,7 +202,11 @@ function SearchResults<T extends ResultWithId>({
const { t } = useTranslation();
const [page, setPage] = React.useState(0);
const [rowsPerPage, setRowsPerPage] = React.useState(10);

useEffect(() => {
setPage(0);
}, [items]);

/// this
const handleChangePage: TablePaginationProps["onPageChange"] = (
_event,


+ 1
- 0
src/components/Shop/Shop.tsx Zobrazit soubor

@@ -205,6 +205,7 @@ const Shop: React.FC = () => {
// SearchBox onSearch will call this
const handleSearch = (inputs: Record<string, string>) => {
setFilters(inputs);
setPagingController((prev) => ({ ...prev, pageNum: 1 }));
const params: Record<string, string> = {};
Object.entries(inputs || {}).forEach(([k, v]) => {
if (v != null && String(v).trim() !== "") params[k] = String(v).trim();


Načítá se…
Zrušit
Uložit