* revert: "feat: refactor filters on insights response table (#17796)"
This reverts commit 5d88858995.
* Put back the search columns and options english terms
This commit is contained in:
1 parent
2a578ea9d5
commit
c41ba9d984
29 files changed
+315
-555
No files matched your search
@@ -22,8 +22,6 @@ import {
|
||||
useFetchMoreOnBottomReached,
|
||||
textFilter,
|
||||
isTextFilterValue,
|
||||
isSelectFilterValue,
|
||||
selectFilter,
|
||||
} from "@calcom/features/data-table";
|
||||
import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
@@ -176,7 +174,7 @@ export function UserListTable() {
|
||||
id: attribute.id,
|
||||
header: attribute.name,
|
||||
meta: {
|
||||
filter: { type: attribute.type.toLowerCase() === "text" ? "text" : "select" },
|
||||
filterType: attribute.type.toLowerCase() === "text" ? "text" : "select",
|
||||
},
|
||||
size: 120,
|
||||
accessorFn: (data) => data.attributes.find((attr) => attr.attributeId === attribute.id)?.value,
|
||||
@@ -200,13 +198,10 @@ export function UserListTable() {
|
||||
|
||||
if (isTextFilterValue(filterValue)) {
|
||||
return attributeValues.some((attr) => textFilter(attr.value, filterValue));
|
||||
} else if (isSelectFilterValue(filterValue)) {
|
||||
return selectFilter(
|
||||
attributeValues.map((attr) => attr.value),
|
||||
filterValue
|
||||
);
|
||||
}
|
||||
return false;
|
||||
|
||||
if (attributeValues.length === 0) return false;
|
||||
return attributeValues.some((attr) => filterValue.includes(attr.value));
|
||||
},
|
||||
})) as ColumnDef<UserTableUser>[]) ?? []
|
||||
);
|
||||
@@ -521,7 +516,7 @@ export function UserListTable() {
|
||||
{t("download")}
|
||||
</DataTableToolbar.CTA>
|
||||
{/* We have to omit member because we don't want the filter to show but we can't disable filtering as we need that for the search bar */}
|
||||
<DataTableFilters.AddFilterButton table={table} omit={["member"]} />
|
||||
<DataTableFilters.FilterButton table={table} omit={["member"]} />
|
||||
<DataTableFilters.ColumnVisibilityButton table={table} />
|
||||
{adminOrOwner && (
|
||||
<DataTableToolbar.CTA
|
||||
|
||||
Reference in new issue
Block a user