mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 11:58:10 +08:00
fix(amis-editor): 公式编辑器弹窗,会缓存已删除的内容 (#8314)
Co-authored-by: wutong25 <wutong25@baidu.com>
This commit is contained in:
parent
b802f54205
commit
ef95033228
@ -381,7 +381,7 @@ export class SelectControlPlugin extends BasePlugin {
|
||||
title: node.schema?.label || node.schema?.name,
|
||||
originalValue: node.schema?.value // 记录原始值,循环引用检测需要
|
||||
};
|
||||
debugger;
|
||||
|
||||
if (node.schema?.joinValues === false) {
|
||||
dataSchema = {
|
||||
...dataSchema,
|
||||
|
@ -4,7 +4,7 @@ import cx from 'classnames';
|
||||
import FormulaEditor from 'amis-ui/lib/components/formula/Editor';
|
||||
|
||||
export interface FormulaPickerProps {
|
||||
onConfirm: (data: string) => void;
|
||||
onConfirm: (data: string | undefined) => void;
|
||||
onClose: () => void;
|
||||
variables: any[];
|
||||
value?: string;
|
||||
@ -23,10 +23,10 @@ export interface CustomFormulaPickerProps extends FormulaPickerProps {
|
||||
|
||||
const FormulaPicker: React.FC<FormulaPickerProps> = props => {
|
||||
const {variables, variableMode, evalMode = true} = props;
|
||||
const [formula, setFormula] = React.useState('');
|
||||
const [formula, setFormula] = React.useState<string | undefined>(undefined);
|
||||
useEffect(() => {
|
||||
const {initable, value} = props;
|
||||
if (initable && value) {
|
||||
if (initable) {
|
||||
setFormula(value);
|
||||
}
|
||||
}, [props.value]);
|
||||
|
Loading…
Reference in New Issue
Block a user