Skip to content

FIX: Add @enabled arg to <LoadMore /> component #33122

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martin-brennan
Copy link
Contributor

This commit adds an @enabled boolean to <LoadMore /> to allow for
cases where the element is visible in the viewport but you don't want to
allow the loadMore behaviour. A use case for this is when our
controllers return some canLoadMore boolean. There is no use
attempting to load more from the server in this case, there will be
nothing else.

I also moved the CSS styles for the <LoadMore /> component into
a new file.

This also fixes a bug in the users list shown here
https://meta.discourse.org/t/users-list-only-partial/368793

This commit adds an @enabled boolean to `<LoadMore />` to allow for
cases where the element is visible in the viewport but you don't want to
allow the `loadMore` behaviour. A use case for this is when our
controllers return some `canLoadMore` boolean. There is no use
attempting to load more from the server in this case, there will be
nothing else.

I also moved the CSS styles for the `<LoadMore />` component into
a new file.

This also fixes a bug in the users list shown here
https://meta.discourse.org/t/users-list-only-partial/368793
@martin-brennan martin-brennan requested a review from tyb-talks June 9, 2025 05:57
@martin-brennan
Copy link
Contributor Author

@tyb-talks can I please get a review on this one?

@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/users-list-only-partial/368793/7

@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/daily-summary-1pm-utc/291852/501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants