Merge pull request #1633 from RoboSats/fix-book-pagination
Some checks failed
Sync lnproxy relays / sync (push) Has been cancelled

Fix book pagination
This commit is contained in:
KoalaSat 2024-11-26 23:35:36 +00:00 committed by GitHub
commit 65fcb64533
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 5 deletions

View File

@ -98,7 +98,7 @@ const BookTable = ({
const [paginationModel, setPaginationModel] = useState<GridPaginationModel>({ const [paginationModel, setPaginationModel] = useState<GridPaginationModel>({
pageSize: 0, pageSize: 0,
page: 0, page: 1,
}); });
const [columnVisibilityModel, setColumnVisibilityModel] = useState<GridColumnVisibilityModel>({}); const [columnVisibilityModel, setColumnVisibilityModel] = useState<GridColumnVisibilityModel>({});
const [fullscreen, setFullscreen] = useState(defaultFullscreen); const [fullscreen, setFullscreen] = useState(defaultFullscreen);
@ -121,10 +121,10 @@ const BookTable = ({
useEffect(() => { useEffect(() => {
setPaginationModel({ setPaginationModel({
pageSize: federation.loading && orders.length === 0 ? 0 : defaultPageSize, pageSize: defaultPageSize,
page: paginationModel.page, page: paginationModel.page ?? 1,
}); });
}, [federationUpdatedAt, orders, defaultPageSize]); }, [defaultPageSize]);
const localeText = useMemo(() => { const localeText = useMemo(() => {
return { return {

View File

@ -65,7 +65,6 @@ const DepthChart: React.FC<DepthChartProps> = ({
useEffect(() => { useEffect(() => {
setCurrencyCode(fav.currency); // as selected in BookControl setCurrencyCode(fav.currency); // as selected in BookControl
setCoordinatorFilter(fav.coordinator); setCoordinatorFilter(fav.coordinator);
console.log(fav.coordinator);
}, [fav.currency, fav.coordinator]); }, [fav.currency, fav.coordinator]);
useEffect(() => { useEffect(() => {