File tree Expand file tree Collapse file tree
adminforth/spa/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 342342 </span >
343343 <div v-if =" totalRows > 0 && pageSizeOptionsComputed?.length"
344344 class =" flex items-center gap-2 ml-auto" >
345- <span class =" text-sm text-lightListTablePaginationHelpText dark:text-darkListTablePaginationHelpText" >
345+ <span class =" text-sm text-lightListTablePaginationHelpText dark:text-darkListTablePaginationHelpText whitespace-nowrap " >
346346 {{ $t('Rows per page') }}
347347 </span >
348- <Select v-model =" pageSizeInternal"
348+ <Select
349+ v-model =" pageSizeInternal"
349350 :options =" pageSizeOptionsComputed"
350351 :searchDisabled =" true"
351- class =" text-sm w-[68px]"
352+ :style =" { width: selectDynamicWidth }"
353+ class =" text-sm "
352354 classesForInput =" h-[34px] min-h-0 py-1 pl-2 pr-6 text-sm rounded-md cursor-pointer af-button-shadow
353355 bg-lightDropdownButtonsBackground text-lightDropdownButtonsText border-lightDropdownButtonsBorder
354356 dark:bg-darkDropdownButtonsBackground dark:text-darkDropdownButtonsText dark:border-darkDropdownButtonsBorder"
@@ -418,6 +420,12 @@ const rowsToRender = computed(() => {
418420 }
419421});
420422
423+ const selectDynamicWidth = computed (() => {
424+ const length = pageSizeInternal .value ?.toString ().length || 2 ;
425+ const calculatedWidth = length * 9 + 50 ;
426+ return ` ${Math .max (68 , calculatedWidth )}px ` ;
427+ });
428+
421429// emits, update page
422430const emits = defineEmits ([
423431 ' update:page' ,
You can’t perform that action at this time.
0 commit comments