Skip to content

Commit

Permalink
Merge pull request #691 from easyops-cn/astrid/fix-attr
Browse files Browse the repository at this point in the history
fix(): 售中工单_模型实例列表页面,当前筛选条件字段为多选枚举型时,无法删除筛选条件
  • Loading branch information
panzekun authored Jul 26, 2024
2 parents be0a07d + 49b6d3b commit a4f08b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { sizeLimit } = require("@next-core/build-config-factory");
module.exports = sizeLimit({
libs: {
"*": "20 KB",
"cmdb-instances": "110 KB",
"cmdb-instances": "115 KB",
"storyboard-visualization": "40 KB",
},
});
5 changes: 4 additions & 1 deletion libs/cmdb-instances/src/instance-list/InstanceList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
keyBy,
cloneDeep,
isNil,
get,
} from "lodash";
import {
BrickAsComponent,
Expand Down Expand Up @@ -1633,7 +1634,9 @@ export function LegacyInstanceList(
if (!Array.isArray(query[key]) && isSpecialFn(query, key)) {
queries.push(query);
} else {
const fieldId = Object.keys((query[key] as Query[])[0])[0];
// 多枚举值数据结构返回这种 {attrId: {$in:[]}}
const fieldId =
Object.keys(get(query[key] as Query[], "[0]", {}))?.[0] || key;
// 判断是否为结构体
const isStruct = isOfStruct(modelData, fieldId);
// 结构体情况处理
Expand Down

0 comments on commit a4f08b7

Please sign in to comment.