Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Lazy Loading #1310

Merged
merged 25 commits into from
Jan 11, 2024
Merged

Feature Lazy Loading #1310

merged 25 commits into from
Jan 11, 2024

Conversation

luanfreitasdev
Copy link
Collaborator

@luanfreitasdev luanfreitasdev commented Dec 27, 2023

⚡ PowerGrid - Pull Request

Motivation

  • Bug fix
  • Enhancement
  • New feature
  • Breaking change

Description

This PR generates some child components to lazy load when the parent component needs to load many records at once.

Example: Let's say you have to load 100 items at once on the page this can make the payload very large and will overload the server. In this case, for example, only 15 lines will be loaded and if you need to load more items, this will be done automatically when scrolling the screen.

public function setUp(): array
{
      return [
            // ...
            Lazy::make()
                ->dispatchAfterToggleDetail('toggleDetailFromChild')
                ->rowsPerChildren(15),
        ];
}
Screen.Recording.2023-12-27.at.12.25.02.mov

Related Issue(s): #_____.

Documentation

This PR requires Documentation update?

  • Yes
  • No
  • I have already submitted a Documentation pull request.

Power-Components/powergrid-doc#89

@luanfreitasdev luanfreitasdev changed the title Feature Lazy Load Components Feature Lazy Loading Jan 4, 2024
@luanfreitasdev luanfreitasdev merged commit ad6b44a into 5.x Jan 11, 2024
30 of 32 checks passed
@luanfreitasdev luanfreitasdev deleted the feature/lazy-child-components branch January 11, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant