fix: replicas not update after cancel
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ const isProduction = env === 'production';
|
||||
const t = Date.now();
|
||||
export default defineConfig({
|
||||
proxy: {
|
||||
...proxy('http://192.168.50.166:8080')
|
||||
...proxy()
|
||||
},
|
||||
history: {
|
||||
type: 'hash'
|
||||
|
||||
@@ -2,7 +2,7 @@ import { CheckOutlined, FormOutlined, UndoOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button, Input, InputNumber, Tooltip } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import React, { useContext } from 'react';
|
||||
import React, { useContext, useEffect } from 'react';
|
||||
import RowContext from '../row-context';
|
||||
import '../styles/cell.less';
|
||||
import { SealColumnProps } from '../types';
|
||||
@@ -35,6 +35,12 @@ const SealColumn: React.FC<SealColumnProps> = (props) => {
|
||||
setCurrent(cachedValue.current);
|
||||
setIsEditing(false);
|
||||
};
|
||||
useEffect(() => {
|
||||
if (editable) {
|
||||
cachedValue.current = row[dataIndex];
|
||||
setCurrent(row[dataIndex]);
|
||||
}
|
||||
}, [row[dataIndex], editable]);
|
||||
|
||||
const renderContent = () => {
|
||||
if (isEditing && editable) {
|
||||
|
||||
Reference in New Issue
Block a user