Skip to content

Commit

Permalink
fix(ux): stores: set a high number as pageLimit (#1195)
Browse files Browse the repository at this point in the history
This is because frappe-ui defaults to `pageLimit` 20. This is
undesirable for stores, since they need `all` entries. As a workaround,
a `pageLimit` of 99999 is used.
  • Loading branch information
ssiyad committed May 18, 2023
1 parent 641b026 commit c8544b2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions desk/src/stores/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const useAgentStore = defineStore("agent", () => {
doctype: "HD Agent",
fields: ["*"],
auto: true,
pageLength: 99999,
});

const options: ComputedRef<Array<Agent>> = computed(
Expand Down
1 change: 1 addition & 0 deletions desk/src/stores/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const useContactStore = defineStore("contact", () => {
doctype: "Contact",
fields: ["*"],
auto: true,
pageLength: 99999,
});

const options: ComputedRef<Array<Contact>> = computed(
Expand Down
1 change: 1 addition & 0 deletions desk/src/stores/team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const useTeamStore = defineStore("team", () => {
const d__ = createListResource({
doctype: "HD Team",
auto: true,
pageLength: 99999,
});

const options: ComputedRef<Array<Team>> = computed(
Expand Down
1 change: 1 addition & 0 deletions desk/src/stores/ticketPriority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const useTicketPriorityStore = defineStore("ticketPriority", () => {
doctype: "HD Ticket Priority",
orderBy: "integer_value desc",
auto: true,
pageLength: 99999,
});

const options: ComputedRef<Array<TicketPriority>> = computed(
Expand Down
1 change: 1 addition & 0 deletions desk/src/stores/ticketType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const useTicketTypeStore = defineStore("ticketType", () => {
doctype: "HD Ticket Type",
fields: ["*"],
auto: true,
pageLength: 99999,
});

const options: ComputedRef<Array<TicketType>> = computed(
Expand Down

0 comments on commit c8544b2

Please sign in to comment.