mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 08:06:00 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 35959aaf6d | |||
| 56fb779f99 | |||
| 134fbd6d34 |
+1
-1
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"bin": "./dist/cli/index.js",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.2",
|
||||
"scripts": {
|
||||
"build:all": "bun run build && bun run build:cli",
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { typeboxResolver } from "@hookform/resolvers/typebox";
|
||||
import type { Static } from "core/utils";
|
||||
import { type TAppDataEntityFields, entitiesSchema } from "data/data-schema";
|
||||
import { mergeWith } from "lodash-es";
|
||||
import { useRef } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { MantineSelect } from "ui/components/form/hook-form-mantine/MantineSelect";
|
||||
@@ -19,15 +20,13 @@ export function StepEntityFields() {
|
||||
const entity = state.entities?.create?.[0]!;
|
||||
const defaultFields = { id: { type: "primary", name: "id" } } as const;
|
||||
const ref = useRef<EntityFieldsFormRef>(null);
|
||||
const initial = entity
|
||||
? entity
|
||||
: {
|
||||
fields: defaultFields,
|
||||
config: {
|
||||
sort_field: "id",
|
||||
sort_dir: "asc"
|
||||
}
|
||||
};
|
||||
const initial = mergeWith(entity, {
|
||||
fields: defaultFields,
|
||||
config: {
|
||||
sort_field: "id",
|
||||
sort_dir: "asc"
|
||||
}
|
||||
});
|
||||
const {
|
||||
control,
|
||||
formState: { isValid, errors },
|
||||
|
||||
Reference in New Issue
Block a user