diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index 21bdf3ff9..d90280145 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -61,6 +61,13 @@ const genCellValueByElement = (colType: TAVCol, cellElement: HTMLElement) => { type: colType, [colType]: JSON.parse(cellElement.querySelector(".av__celltext").getAttribute("data-value")) }; + } else if (colType === "checkbox") { + cellValue = { + type: colType, + checkbox: { + checked: cellElement.querySelector("use").getAttribute("xlink:href") === "#iconCheck" ? true : false + } + }; } return cellValue; } @@ -113,6 +120,13 @@ export const genCellValue = (colType: TAVCol, value: string | any) => { isNotTime: true, } }; + } else if (colType === "checkbox") { + cellValue = { + type: colType, + checkbox: { + checked: value ? true : false + } + }; } } else { if (colType === "mSelect" || colType === "select") { diff --git a/app/src/protyle/render/av/filter.ts b/app/src/protyle/render/av/filter.ts index f317dbf09..d76011203 100644 --- a/app/src/protyle/render/av/filter.ts +++ b/app/src/protyle/render/av/filter.ts @@ -12,6 +12,9 @@ export const getDefaultOperatorByType = (type: TAVCol) => { if (["select", "number"].includes(type)) { return "="; } + if (["checkbox"].includes(type)) { + return "Is false"; + } if (["text", "mSelect", "url", "block", "email", "phone", "template"].includes(type)) { return "Contains"; }