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

Need an option to not showing loading spinner or "load more..." while scrolling to the end of the grid #2584

Open
cloudzooming opened this issue Nov 16, 2024 · 0 comments

Comments

@cloudzooming
Copy link

first of all, thank you so much for the great library. I was using version 1.5 a lot in some projects.

I recently created a simple website to view .plist files online, which uses w2grid to show the data. Because the data are usually fixed, it does not need to load extra data while scrolling. So, I think if it's possible to

Add an option to hide the loading indicator at the end of grid
for example .showLoadingIndicator = false
Especially when the "autoLoad" option is false,

changes on line 7891 in w2grid.js

            more.show()
                .eq(1) // only main table
                .off('.load-more')
                .on('click.load-more', function() {
                    // show spinner
                    query(this).find('td').html('<div><div style="width: 20px; height: 20px;" class="w2ui-spinner"></div></div>')
                    // load more
                    obj.last.pull_more   = true
                    obj.last.fetch.offset += obj.limit
                    obj.request('load')
                })
                .find('td')
                .html(obj.autoLoad
                    ? '<div><div style="width: 20px; height: 20px;" class="w2ui-spinner"></div></div>'
                    : obj.showLoadingIndicator ?'<div style="padding-top: 15px">'+ w2utils.lang('Load ${count} more...', { count: obj.limit }) + '</div>' : ''
                )

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

No branches or pull requests

1 participant