fix list operate

This commit is contained in:
Warunee Tamkoo 2026-02-09 17:43:09 +07:00
parent 7136ac966c
commit c55780914c
2 changed files with 9 additions and 7 deletions

View file

@ -25,7 +25,7 @@ const props = defineProps<{
const selected = ref<DataOperators[]>([]);
const keyword = ref<string>("");
const isAct = ref<boolean>(true);
const isAct = ref<boolean>(false);
const rows = ref<DataOperators[]>([]);
const visibleColumns = ref<string[]>([
"posNo",
@ -79,10 +79,12 @@ const roleName = ref<string>("");
const roleNameList = ref<string[]>([
"เจ้าหน้าที่ดำเนินการ",
"ผอ.สกจ.",
"รักษาการ ผอ.สกจ.",
"ผอ. กบห.",
"รักษาการ ผอ. กบห.",
"ผอ. ส่วน",
"รักษาการฯ ผอ.สกจ.",
"ผอ.",
"รักษาการฯ ผอ.",
"ผอ.ส่วน",
"หน.กลุ่มงาน",
"หน.ฝ่าย",
]);
const roleNameOption = ref<string[]>(roleNameList.value);
@ -166,7 +168,7 @@ function fetchNewListOperator() {
function filterOptionFnRoleName(val: string, update: Function) {
update(() => {
if (val === "") {
roleNameOption.value = [];
roleNameOption.value = roleNameList.value;
} else {
const needle = val.toLowerCase();
roleNameOption.value = roleNameList.value.filter((item: string) =>