mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-09-15 09:17:55 +08:00
13 lines
416 B
TypeScript
13 lines
416 B
TypeScript
import type { ContainerChangeEventData } from '@tmagic/form';
|
|
import { setValueByKeyPath } from '@tmagic/utils';
|
|
|
|
export const applyInlineEditChange = (target: any, eventData: ContainerChangeEventData) => {
|
|
if (eventData.changeRecords?.length) {
|
|
for (const record of eventData.changeRecords) {
|
|
if (record.propPath) {
|
|
setValueByKeyPath(record.propPath, record.value, target);
|
|
}
|
|
}
|
|
}
|
|
};
|