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

feat(ui5-list): introduce "growing" property #2950

Merged
merged 4 commits into from
Mar 17, 2021
Merged

Conversation

ilhan007
Copy link
Member

@ilhan007 ilhan007 commented Mar 16, 2021

Similar to the ui5-table, now the ui5-list provides growing property with 3 available options:

  • Button: Shows a "More" button at the bottom of the list
    pressing of which triggers the "load-more" event.
  • Scroll: The "load-more" event is triggered when the user scrolls to the bottom of the list.
  • None: growing is off

As a side effect, it allows developers to set "max-height, overflow: auto" and the "load-more" still working as expected,
fixing the referenced SF request #2882.
Previously not possible as the List used to listen for the "scroll" of its internal container, which could not be influenced by these external styles.

Testing
You can test the behavior with the following test pages:
ListGrowing_Button.html
ListGrowing_Scroll.html

FIXES: #2882

BREAKING_CHANGES: The "infiniteScroll" property has been removed, use growing="Scroll" instead.

Similar to the ui5-table, now the ui5-list provides growing property with 3 available options:
- Button:  Shows a "More" button at the bottom of the list
 pressing of which triggers the "load-more" event.
- Scroll: The "load-more" event is triggered when the user scrolls to the bottom of the list.
- None:  growing is off

BREAKING_CHANGES: infiniteScroll has been removed, use growing="Scroll" instead
@ilhan007
Copy link
Member Author

ilhan007 commented Mar 16, 2021

For your information @sfsf-xweb-sh

@ilhan007 ilhan007 closed this Mar 16, 2021
@ilhan007 ilhan007 reopened this Mar 16, 2021
*/
infiniteScroll: {
type: Boolean,
growing: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 space off, but don't lose the build for that

this.unobserveListEnd();
}

if (this.grows) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.grows or rather this.growsOnScroll? Do we need the resize listener for button mode?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we do for the busy indicator. I think I got it

@ilhan007 ilhan007 merged commit 6fbbb21 into master Mar 17, 2021
@ilhan007 ilhan007 deleted the feat-list-growing branch March 17, 2021 16:31
ilhan007 added a commit that referenced this pull request Mar 17, 2021
Similar to the ui5-table, now the ui5-list provides growing property with 3 available options:
Button, Scroll, None.
As a side effect, it allows developers to set "max-height, overflow: auto" and the "load-more" still working as expected, fixing the referenced SF request #2882. Previously not possible as the List used to listen for the "scroll" of its internal container, which could not be influenced by these external styles.

FIXES: #2882

BREAKING_CHANGES: The "infiniteScroll" property has been removed, use growing="Scroll" instead.
@ilhan007
Copy link
Member Author

@MarcusNotheis FYI

ilhan007 added a commit that referenced this pull request Mar 18, 2021
Similar to the ui5-table, now the ui5-list provides growing property with 3 available options:
Button, Scroll, None. 
As a side effect, it allows developers to set "max-height, overflow: auto" and the "load-more" still working as expected, fixing the referenced SF request #2882. Previously not possible as the List used to listen for the "scroll" of its internal container, which could not be influenced by these external styles.

FIXES: #2882

BREAKING_CHANGES: The "infiniteScroll" property has been removed, use growing="Scroll" instead.
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.

[BUG][SF][ui5-list] load-more event does not work, if I only set max-height to ui5 list
2 participants