diff --git a/comps/filter/parser/filter-where.ts b/comps/filter/parser/filter-where.ts index b4c36c2..12d9451 100755 --- a/comps/filter/parser/filter-where.ts +++ b/comps/filter/parser/filter-where.ts @@ -1,5 +1,4 @@ -import { GFCol } from "lib/gen/utils"; -import { parseGenField } from "../../../.."; +import { GFCol, parseGenField } from "lib/gen/utils"; import { getFilter } from "../utils/get-filter"; import { parseSingleFilter } from "./single-filter"; import { softDeleteFilter } from "./soft-delete-filter"; diff --git a/comps/filter/utils/get-filter.ts b/comps/filter/utils/get-filter.ts index a077b36..a6dcf9d 100755 --- a/comps/filter/utils/get-filter.ts +++ b/comps/filter/utils/get-filter.ts @@ -1,4 +1,4 @@ -import { getPathname } from "../../../.."; +import { getPathname } from "lib/utils/pathname"; import { filter_window } from "./types"; export const getFilter = (name: string) => { diff --git a/comps/form/gen/gen-table-edit.ts b/comps/form/gen/gen-table-edit.ts index 36ed18f..3e078d9 100755 --- a/comps/form/gen/gen-table-edit.ts +++ b/comps/form/gen/gen-table-edit.ts @@ -317,7 +317,6 @@ export const genTableEdit = async ( name: "btn-submit", type: "item", edit: null as any, - padding: { b: 10, l: 10, r: 10, t: 0 }, childs: [ { id: createId(), diff --git a/comps/form/typings.ts b/comps/form/typings.ts index c5bd04a..c57bc61 100755 --- a/comps/form/typings.ts +++ b/comps/form/typings.ts @@ -150,6 +150,7 @@ export type FieldInternal = { disabled: boolean; required_msg: FieldProp["required_msg"]; col?: GFCol; + ref?: any; Child: () => ReactNode; custom: FieldProp["custom"]; input: Record & { diff --git a/comps/md/gen/md-gen.ts b/comps/md/gen/md-gen.ts index a9507eb..e45ae70 100755 --- a/comps/md/gen/md-gen.ts +++ b/comps/md/gen/md-gen.ts @@ -1,7 +1,6 @@ import { GenFn } from "lib/gen/utils"; -import { generateList } from "./md-list"; -import { generateForm } from "../../../.."; import { generateMDForm } from "./md-form"; +import { generateList } from "./md-list"; const w = window as unknown as { generating_prasi_md: Record; diff --git a/comps/ui/button.tsx b/comps/ui/button.tsx index 4142109..dc1d9b8 100755 --- a/comps/ui/button.tsx +++ b/comps/ui/button.tsx @@ -43,27 +43,28 @@ export interface ButtonProps asChild?: boolean; } -const Button = React.forwardRef( - ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button"; +const Button = React.forwardRef< + HTMLDivElement | HTMLButtonElement, + ButtonProps +>(({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button"; - return ( -
div { - border-radius: calc(var(--radius) - 2px); - } - ` - )} - ref={ref} - {...props} - /> - ); - } -); + return ( +
div { + border-radius: calc(var(--radius) - 2px); + } + ` + )} + ref={ref as any} + {...props} + /> + ); +}); Button.displayName = "Button"; const FloatButton = React.forwardRef(