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