mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 20:37:21 +00:00
fix entity list unnecessary parameters
This commit is contained in:
@@ -40,8 +40,8 @@ export function DataEntityList({ params }) {
|
||||
useBrowserTitle(["Data", entity?.label ?? params.entity]);
|
||||
const [navigate] = useNavigate();
|
||||
const search = useSearch(searchSchema, {
|
||||
select: entity?.getSelect(undefined, "table") ?? [],
|
||||
sort: entity?.getDefaultSort()
|
||||
select: undefined,
|
||||
sort: undefined
|
||||
});
|
||||
|
||||
const $q = useApiQuery(
|
||||
@@ -50,7 +50,7 @@ export function DataEntityList({ params }) {
|
||||
select: search.value.select,
|
||||
limit: search.value.perPage,
|
||||
offset: (search.value.page - 1) * search.value.perPage,
|
||||
sort: search.value.sort
|
||||
sort: `${search.value.sort.dir === "asc" ? "" : "-"}${search.value.sort.by}`
|
||||
}),
|
||||
{
|
||||
enabled: !!entity,
|
||||
@@ -131,7 +131,7 @@ export function DataEntityList({ params }) {
|
||||
<EntityTable2
|
||||
data={data ?? null}
|
||||
entity={entity}
|
||||
/*select={search.value.select}*/
|
||||
select={search.value.select}
|
||||
onClickRow={handleClickRow}
|
||||
page={search.value.page}
|
||||
sort={search.value.sort}
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
import { IconHome } from "@tabler/icons-react";
|
||||
import { useEffect } from "react";
|
||||
import { useAuth } from "ui/client";
|
||||
import { useEffectOnce } from "ui/hooks/use-effect";
|
||||
import { Empty } from "../components/display/Empty";
|
||||
import { useBrowserTitle } from "../hooks/use-browser-title";
|
||||
import * as AppShell from "../layouts/AppShell/AppShell";
|
||||
import { useNavigate } from "../lib/routes";
|
||||
|
||||
export const Root = ({ children }) => {
|
||||
const { verify } = useAuth();
|
||||
const { verify, user } = useAuth();
|
||||
|
||||
useEffect(() => {
|
||||
useEffectOnce(() => {
|
||||
verify();
|
||||
}, []);
|
||||
}, [user?.id]);
|
||||
|
||||
return (
|
||||
<AppShell.Root>
|
||||
|
||||
Reference in New Issue
Block a user