UNPKG

fastapi-rtk

Version:

A React component library for FastAPI in combination with FastAPI React Toolkit backend, built with Mantine, JsonForms, and Zustand.

20 lines (19 loc) 572 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const getInitialQueryParams = () => ({ columns: [], filters: [], page: 0, page_size: 25 }); const createQueryParams = (currentQueryParams, partialQueryParams = {}) => Object.entries(partialQueryParams).reduce( (acc, [key, value]) => { if (value === null || value === void 0) { delete acc[key]; return acc; } return { ...acc, [key]: value }; }, { ...currentQueryParams ?? getInitialQueryParams() } ); exports.createQueryParams = createQueryParams;