Commit f3cf7e75 authored by zhangwenshuai's avatar zhangwenshuai

add empty check on cellChange

parent d7b7482c
...@@ -12,6 +12,7 @@ import secondIcon from '../assets/second.png'; ...@@ -12,6 +12,7 @@ import secondIcon from '../assets/second.png';
import thirdIcon from '../assets/third.png'; import thirdIcon from '../assets/third.png';
import expandIcon from '../assets/extend.png'; import expandIcon from '../assets/extend.png';
import { transferAttr } from './base/_utils/transferAttr'; import { transferAttr } from './base/_utils/transferAttr';
import { emptyModel } from '@/submodule/components/apolloTable/component/base/_utils/setFormatter';
const Cell = (props: CellProps) => { const Cell = (props: CellProps) => {
const { const {
...@@ -54,10 +55,13 @@ const Cell = (props: CellProps) => { ...@@ -54,10 +55,13 @@ const Cell = (props: CellProps) => {
const changeCellData = (changedValue: any, option?: any) => {}; const changeCellData = (changedValue: any, option?: any) => {};
const emitChangeCellData = (changedValue: any, optionValue: any) => { const emitChangeCellData = (changedValue: any, optionValue: any) => {
const temp: CellDataProps[] = []; let temp: CellDataProps[] = [];
cellData.map((item: CellDataProps) => { cellData.map((item: CellDataProps) => {
temp.push({ text: item.text, value: item.value }); temp.push({ text: item.text, value: item.value });
}); });
if (temp.length === 0) {
temp = emptyModel;
}
if (_.isEqual(temp, changedValue)) { if (_.isEqual(temp, changedValue)) {
setStatus('detail'); setStatus('detail');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment