fix: page freeze when handling formula field in sub-table after add,select and delete record (#4613)

* fix: page freeze when handling formula field in sub-table after add, select, and delete record

* fix: bug

* fix: bug

* refactor: code improve

* refactor: code improve

* refactor: code improve

* fix: bug

* fix: bug
This commit is contained in:
Katherine 2024-06-12 10:08:54 +08:00 committed by GitHub
parent 585fea650e
commit 5d48b3b5aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 25 deletions

View File

@ -102,7 +102,7 @@ export const SubTable: any = observer(
const { selectedRows, setSelectedRows } = useContext(RecordPickerContext);
return {
onClick() {
selectedRows.map((v) => field.value.push(markRecordAsNew({ ...v })));
selectedRows.map((v) => field.value.push(v));
field.onInput(field.value);
setSelectedRows([]);
setVisible(false);

View File

@ -71,7 +71,7 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
[collectionName, mode, setValue],
);
const textAreaStyle = useMemo(() => {
return { minWidth: 460, marginRight: 15 };
return { minWidth: 460 };
}, []);
const compatScope = useMemo(() => {
return compatOldVariables(scope, {
@ -120,7 +120,6 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
value={mode}
style={{ width: 150 }}
onChange={(value) => {
console.log(value);
setMode(value);
setValue({
mode: value,