pegros / PEG_LIST

Set of configurable/actionable LWC list components for Salesforce Lightning UX
MIT License
20 stars 8 forks source link

[feat] sfpegList - Execute queries on display #68

Closed xdefos closed 1 month ago

xdefos commented 2 months ago

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like I'm using the List component and I'd like it not to execute SOQL queries on display. I'd like this to be done on user click. In fact, I have a page that already has a large ETP and I don't want to make it any heavier. Do you have any configuration ideas to address this need?

Describe alternatives you've considered One option would be to have conditional display on a Boolean field on the record or the user to display the list vs a field change action button.

Additional context In my use case, I'm using a List with an Apex CTL to fetch and merge SOQL queries in Custom Object and External Object

pegros commented 2 months ago

@xdefos I shall have a look at this asap.

pegros commented 2 months ago

@xdefos I preferred not to touch the init logic of the sfpegListCmp component and implemented a very simple wrapper component for this (see sfpegOnDemandListCmp component in the example folder).

It offers exactly the same configuration capabilities, presenting only a card with the configured title and an expand icon button by default, actually displaying the sfpegListCmp only once user clicks on the icon button.

Please try it and tell me if it meets your needs or if you have additional remarks.

pegros commented 2 months ago

In the App. Builder Capture d’écran 2024-04-24 à 14 13 25

Default Closed/Unloaded State Capture d’écran 2024-04-24 à 14 13 40

Expanded State Capture d’écran 2024-04-24 à 14 13 52

🙂 Example with the sfpegOrgLimits sfpegList configuration (see example section)!

pegros commented 1 month ago

@xdefos I shall close this issue as I provided a solution meeting your requirements (even though not directly on the sfpegListCmp component).