Skip to content

Commit 3423a59

Browse files
committed
feat: add minimum width to page size selector and update options logic for dynamic list page size
1 parent 3c6049a commit 3423a59

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

adminforth/spa/src/components/ResourceListTable.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@
352352
:disableTogleOfSelectedItem="true"
353353
:style="{ width: selectDynamicWidth }"
354354
:placeholder="pageSizeInternal?.toString()"
355-
class="text-sm"
355+
class="text-sm min-w-20"
356356
classesForInput="h-[34px] min-h-0 py-1 pl-2 pr-6 text-sm rounded-md cursor-pointer af-button-shadow bg-lightDropdownButtonsBackground text-lightDropdownButtonsText border-lightDropdownButtonsBorder dark:bg-darkDropdownButtonsBackground dark:text-darkDropdownButtonsText dark:border-darkDropdownButtonsBorder"
357357
/>
358358
</div>
@@ -433,8 +433,8 @@ const emits = defineEmits([
433433
const pageSizeOptionsComputed = computed(() => {
434434
let combinedOptions = [...props.pageSizeOptions];
435435
436-
if (props.pageSize && !combinedOptions.includes(props.pageSize)) {
437-
combinedOptions.push(props.pageSize);
436+
if (props.resource?.options?.listPageSize && !combinedOptions.includes(props.resource?.options?.listPageSize)) {
437+
combinedOptions.push(props.resource?.options?.listPageSize);
438438
combinedOptions.sort((a, b) => a - b);
439439
}
440440

0 commit comments

Comments
 (0)