File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed
adminforth/spa/src/components Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 2121 <div class =" flex items-center" >
2222 <input id =" checkbox-all-search" type =" checkbox" :checked =" allFromThisPageChecked" @change =" selectAll()"
2323 :disabled =" !rows || !rows.length"
24- class =" w-4 h-4 cursor-pointer text-blue-600 bg-gray-100 border-gray-300 rounded
24+ class =" w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded
2525 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" >
2626 <label for =" checkbox-all-search" class =" sr-only" >{{ $t('checkbox') }}</label >
2727 </div >
@@ -416,7 +416,7 @@ async function selectAll(value) {
416416const totalPages = computed (() => Math .ceil (props .totalRows / props .pageSize ));
417417
418418const allFromThisPageChecked = computed (() => {
419- if (! props .rows ) return false ;
419+ if (! props .rows || ! props . rows . length ) return false ;
420420 return props .rows .every ((r ) => checkboxesInternal .value .includes (r ._primaryKeyValue ));
421421});
422422const ascArr = computed (() => sort .value .filter ((s ) => s .direction === ' asc' ).map ((s ) => s .field ));
@@ -572,4 +572,13 @@ async function startCustomAction(actionId, row) {
572572}
573573
574574
575- </script >
575+ </script >
576+
577+ <style lang="scss" scoped>
578+ input [type = " checkbox" ][disabled ] {
579+ @apply opacity- 50;
580+ }
581+ input [type = " checkbox" ]:not ([disabled ]) {
582+ @apply cursor-pointer ;
583+ }
584+ </style >
Original file line number Diff line number Diff line change @@ -223,16 +223,9 @@ export default {
223223 {
224224 name : "room_sizes" ,
225225 type : AdminForthDataTypes . JSON ,
226- // isArray: {
227- // enabled: true,
228- // itemType: AdminForthDataTypes.FLOAT,
229- // },
230226 isArray : {
231227 enabled : true ,
232- itemType : AdminForthDataTypes . STRING ,
233- } ,
234- foreignResource : {
235- resourceId : "users" ,
228+ itemType : AdminForthDataTypes . FLOAT ,
236229 } ,
237230 } ,
238231 {
You can’t perform that action at this time.
0 commit comments