fix keyvalue

This commit is contained in:
rizky 2024-08-12 14:58:29 -07:00
parent 0342d40082
commit bdb9216c17
2 changed files with 6 additions and 4 deletions

View File

@ -67,7 +67,7 @@ export const Field: FC<FieldProp> = (arg) => {
return (
<LabelDiv
mode={sub_type === "table-edit" ? "div" : "label"}
mode={sub_type === "table-edit" ? "div" : field.label ? "label" : "div"}
{...props}
className={cx(
"field",

View File

@ -50,6 +50,10 @@ export const KeyValue = ({
return (
<div className="c-flex c-relative c-flex-1" ref={ref}>
<table
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
}}
className={cx(
"c-flex-1",
css`
@ -141,7 +145,7 @@ const KVRow = ({
"kv-key",
css`
border-right: 1px solid #ececeb;
width: 30%;
width: 35%;
`,
idx > 0 &&
css`
@ -150,7 +154,6 @@ const KVRow = ({
)}
>
<input
tabIndex={0}
type="text"
spellCheck={false}
value={k}
@ -177,7 +180,6 @@ const KVRow = ({
)}
>
<input
tabIndex={0}
type="text"
spellCheck={false}
value={v || ""}