|
20 | 20 | <!-- table header -->
|
21 | 21 | <tr class="t-header sticky z-10 top-0 text-xs bg-lightListTableHeading dark:bg-darkListTableHeading dark:text-gray-400">
|
22 | 22 | <td scope="col" class="p-4">
|
23 |
| - <div class="flex items-center justify-center relative"> |
24 |
| - <input id="checkbox-all-search" type="checkbox" :checked="allFromThisPageChecked" @change="selectAll()" |
25 |
| - :disabled="!rows || !rows.length" |
26 |
| - class="peer appearance-none w-4 h-4 text-blue-600 bg-light-primary border border-gray-500 rounded-sm checked:bg-blue-500 |
27 |
| - focus:ring-blue-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 |
28 |
| - focus:ring-2 dark:bg-dark-primary dark:border-gray-600 dark:checked:bg-blue-500 cursor-pointer"> |
29 |
| - <label for="checkbox-all-search" class="sr-only">{{ $t('checkbox') }}</label> |
30 |
| - <div class="pointer-events-none absolute text-white text-[13px] leading-none peer-checked:block hidden"> |
31 |
| - <IconCheckOutline width="18" height="18" /> |
32 |
| - </div> |
33 |
| - </div> |
| 23 | + <Checkbox |
| 24 | + v-model="allFromThisPageChecked" |
| 25 | + :disabled="!rows || !rows.length" |
| 26 | + @update:modelValue="selectAll" |
| 27 | + > |
| 28 | + <span class="sr-only">{{ $t('checkbox') }}</span> |
| 29 | + </Checkbox> |
34 | 30 | </td>
|
35 | 31 |
|
36 | 32 | <td v-for="c in columnsListed" ref="headerRefs" scope="col" class="px-2 md:px-3 lg:px-6 py-3">
|
|
106 | 102 | @mounted="(el) => updateRowHeight(`row_${row._primaryKeyValue}`, el.offsetHeight)"
|
107 | 103 | >
|
108 | 104 | <td class="w-4 p-4 cursor-default" @click="(e)=>e.stopPropagation()">
|
109 |
| - <div class="flex items-center justify-center relative"> |
110 |
| - <input |
111 |
| - @click="(e)=>e.stopPropagation()" |
112 |
| - id="checkbox-table-search-1" |
113 |
| - type="checkbox" |
114 |
| - :checked="checkboxesInternal.includes(row._primaryKeyValue)" |
115 |
| - @change="(e)=>{addToCheckedValues(row._primaryKeyValue)}" |
116 |
| - class="peer appearance-none w-4 h-4 text-blue-600 bg-gray-50 border border-gray-500 rounded-sm checked:bg-blue-500 |
117 |
| - focus:ring-blue-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 |
118 |
| - focus:ring-2 dark:bg-gray-700 dark:border-gray-600 dark:checked:bg-blue-500 cursor-pointer" |
119 |
| - /> |
120 |
| - <label for="checkbox-table-search-1" class="sr-only"> |
121 |
| - {{ $t('checkbox') }} |
122 |
| - </label> |
123 |
| - <div class="pointer-events-none absolute text-white text-[13px] leading-none peer-checked:block hidden"> |
124 |
| - <IconCheckOutline width="18" height="18" /> |
125 |
| - </div> |
126 |
| - </div> |
| 105 | + <Checkbox |
| 106 | + :model-value="checkboxesInternal.includes(row._primaryKeyValue)" |
| 107 | + @change="(e)=>{addToCheckedValues(row._primaryKeyValue)}" |
| 108 | + @click="(e)=>e.stopPropagation()" |
| 109 | + > |
| 110 | + <span class="sr-only">{{ $t('checkbox') }}</span> |
| 111 | + </Checkbox> |
127 | 112 | </td>
|
128 | 113 | <td v-for="c in columnsListed" class="px-2 md:px-3 lg:px-6 py-4">
|
129 | 114 | <!-- if c.name in listComponentsPerColumn, render it. If not, render ValueRenderer -->
|
@@ -342,6 +327,7 @@ import router from '@/router';
|
342 | 327 | import { Tooltip } from '@/afcl';
|
343 | 328 | import type { AdminForthResourceCommon } from '@/types/Common';
|
344 | 329 | import adminforth from '@/adminforth';
|
| 330 | +import Checkbox from '@/afcl/Checkbox.vue'; |
345 | 331 |
|
346 | 332 | const coreStore = useCoreStore();
|
347 | 333 | const { t } = useI18n();
|
|
0 commit comments