fix save table edit
This commit is contained in:
parent
e49b299249
commit
0f48c5aee2
|
|
@ -66,7 +66,7 @@ export const Field: FC<FieldProp> = (arg) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local.prev_val !== fm.data[name]) {
|
if (local.prev_val !== fm.data[name]) {
|
||||||
if (typeof fm.data[name] === "object" && fm.deps.md) {
|
if (typeof fm.data[name] === "object") {
|
||||||
const sfied = hashSum(prepForSum(fm.data[name]));
|
const sfied = hashSum(prepForSum(fm.data[name]));
|
||||||
|
|
||||||
if (sfied !== local.prev_val) {
|
if (sfied !== local.prev_val) {
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,7 @@ export const TableEdit: FC<{
|
||||||
data={row}
|
data={row}
|
||||||
on_change={(_fm) => {
|
on_change={(_fm) => {
|
||||||
fm.data[name][idx] = _fm.data;
|
fm.data[name][idx] = _fm.data;
|
||||||
|
fm.data[name] = [...fm.data[name]];
|
||||||
fm.render();
|
fm.render();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export const formInit = (fm: FMLocal, props: FMProps) => {
|
||||||
toast.success(
|
toast.success(
|
||||||
<div
|
<div
|
||||||
className={cx(
|
className={cx(
|
||||||
"c-flex c-flex-col c-select-none c-items-stretch c-flex-1 c-w-full"
|
"c-cursor-pointer c-flex c-flex-col c-select-none c-items-stretch c-flex-1 c-w-full"
|
||||||
)}
|
)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
toast.dismiss();
|
toast.dismiss();
|
||||||
|
|
@ -124,8 +124,10 @@ export const formInit = (fm: FMLocal, props: FMProps) => {
|
||||||
} else {
|
} else {
|
||||||
toast.success(
|
toast.success(
|
||||||
<div
|
<div
|
||||||
className={cx("c-flex c-flex-col c-select-none")}
|
className={cx("c-cursor-pointer c-flex c-flex-col c-select-none")}
|
||||||
onClick={() => {}}
|
onClick={() => {
|
||||||
|
toast.dismiss();
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div className="c-flex c-text-green-700 c-items-center">
|
<div className="c-flex c-text-green-700 c-items-center">
|
||||||
<Check className="c-h-4 c-w-4 c-mr-1 " />
|
<Check className="c-h-4 c-w-4 c-mr-1 " />
|
||||||
|
|
@ -266,6 +268,8 @@ export const formInit = (fm: FMLocal, props: FMProps) => {
|
||||||
fm.render();
|
fm.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.clear();
|
||||||
|
|
||||||
if (fm.props.sonar === "on" && !isEditor) {
|
if (fm.props.sonar === "on" && !isEditor) {
|
||||||
toast.dismiss();
|
toast.dismiss();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue