fix entity form fields regression

This commit is contained in:
dswbx
2025-01-18 09:15:32 +01:00
parent f4dc26198b
commit ad61770ef4
3 changed files with 16 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
"type": "module", "type": "module",
"sideEffects": false, "sideEffects": false,
"bin": "./dist/cli/index.js", "bin": "./dist/cli/index.js",
"version": "0.6.0-rc.7", "version": "0.6.0-rc.10",
"description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, Remix, Astro, Cloudflare, Bun, Node, AWS Lambda & more.", "description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, Remix, Astro, Cloudflare, Bun, Node, AWS Lambda & more.",
"homepage": "https://bknd.io", "homepage": "https://bknd.io",
"repository": { "repository": {

View File

@@ -8,7 +8,14 @@ import { isDebug } from "core";
import type { Entity } from "data"; import type { Entity } from "data";
import { cloneDeep } from "lodash-es"; import { cloneDeep } from "lodash-es";
import { useRef, useState } from "react"; import { useRef, useState } from "react";
import { TbCirclesRelation, TbDots, TbPhoto, TbPlus, TbSitemap } from "react-icons/tb"; import {
TbCirclesRelation,
TbDatabasePlus,
TbDots,
TbPhoto,
TbPlus,
TbSitemap
} from "react-icons/tb";
import { useBkndData } from "ui/client/schema/data/use-bknd-data"; import { useBkndData } from "ui/client/schema/data/use-bknd-data";
import { Button } from "ui/components/buttons/Button"; import { Button } from "ui/components/buttons/Button";
import { IconButton } from "ui/components/buttons/IconButton"; import { IconButton } from "ui/components/buttons/IconButton";
@@ -79,6 +86,12 @@ export function DataSchemaEntity({ params }) {
icon: TbPhoto, icon: TbPhoto,
label: "Add media", label: "Add media",
onClick: () => $data.modals.createMedia(entity.name) onClick: () => $data.modals.createMedia(entity.name)
},
() => <div className="h-px my-1 w-full bg-primary/5" />,
{
icon: TbDatabasePlus,
label: "Create Entity",
onClick: () => $data.modals.createEntity()
} }
]} ]}
position="bottom-end" position="bottom-end"

View File

@@ -225,7 +225,7 @@ const SelectType = ({
IconLeft={type.icon} IconLeft={type.icon}
variant="ghost" variant="ghost"
onClick={() => { onClick={() => {
if (type.addable) { if (type.addable !== false) {
onSelect(type.type); onSelect(type.type);
} else { } else {
type.onClick?.(); type.onClick?.();