misc: 세력장수에서 숫자 셀에는 숫자 대소비교 필터 설정
This commit is contained in:
@@ -80,7 +80,7 @@ import type { GeneralListItem, GeneralListItemP1, GeneralListItemP2, GeneralList
|
|||||||
import { getIconPath } from "@/util/getIconPath";
|
import { getIconPath } from "@/util/getIconPath";
|
||||||
import { inject, ref, watch, type PropType, type Ref, type StyleValue } from "vue";
|
import { inject, ref, watch, type PropType, type Ref, type StyleValue } from "vue";
|
||||||
import { AgGridVue } from "ag-grid-vue3";
|
import { AgGridVue } from "ag-grid-vue3";
|
||||||
import type {
|
import {
|
||||||
Column,
|
Column,
|
||||||
CellClassParams,
|
CellClassParams,
|
||||||
CellStyle,
|
CellStyle,
|
||||||
@@ -92,6 +92,7 @@ import type {
|
|||||||
GridReadyEvent,
|
GridReadyEvent,
|
||||||
CellClickedEvent,
|
CellClickedEvent,
|
||||||
IRowNode,
|
IRowNode,
|
||||||
|
NumberFilter,
|
||||||
} from "ag-grid-community";
|
} from "ag-grid-community";
|
||||||
import { ProvidedColumnGroup } from "ag-grid-community";
|
import { ProvidedColumnGroup } from "ag-grid-community";
|
||||||
import { getNPCColor } from "@/utilGame";
|
import { getNPCColor } from "@/utilGame";
|
||||||
@@ -483,7 +484,7 @@ const sortableNumber: Omit<GenColDef, "colId" | "headerName"> = {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
comparator: (a, b, _a, _b, _desc) => a - b,
|
comparator: (a, b, _a, _b, _desc) => a - b,
|
||||||
sortingOrder: ["desc", "asc", null],
|
sortingOrder: ["desc", "asc", null],
|
||||||
filter: "number",
|
filter: NumberFilter,
|
||||||
cellClass: rightAlignClass,
|
cellClass: rightAlignClass,
|
||||||
};
|
};
|
||||||
const defaultColDef = ref<ColDef>({
|
const defaultColDef = ref<ColDef>({
|
||||||
@@ -669,7 +670,7 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
|
|||||||
return (_a.data?.dedlevel??0) - (_b.data?.dedlevel??0);
|
return (_a.data?.dedlevel??0) - (_b.data?.dedlevel??0);
|
||||||
},
|
},
|
||||||
sortingOrder: ["desc", "asc", null],
|
sortingOrder: ["desc", "asc", null],
|
||||||
filter: "text",
|
filter: true,
|
||||||
cellClass: centerCellClass,
|
cellClass: centerCellClass,
|
||||||
columnGroupShow: "open",
|
columnGroupShow: "open",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user