the preview count dropdown menu always shows the "10" option

This commit is contained in:
MaysWind
2025-11-24 22:37:24 +08:00
parent 7d70859107
commit ba278e47ff
@@ -167,13 +167,12 @@ function getDisplayCount(count: number): string {
function getTablePageOptions(linesCount?: number): NameNumeralValue[] { function getTablePageOptions(linesCount?: number): NameNumeralValue[] {
const pageOptions: NameNumeralValue[] = []; const pageOptions: NameNumeralValue[] = [];
if (!linesCount || linesCount < 1) { if (!linesCount) {
pageOptions.push({ value: -1, name: tt('All') }); linesCount = 0;
return pageOptions;
} }
for (const count of [ 10, 50, 100 ]) { for (const count of [ 10, 50, 100 ]) {
if (linesCount < count) { if (count > 10 && count > previewCount.value && linesCount < count) {
break; break;
} }