mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 08:14:25 +08:00
the preview count dropdown menu always shows the "10" option
This commit is contained in:
+3
-4
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user