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

Remove enableLoader and built-in loading status management from lazy #3963

Closed
steve3d opened this issue Sep 15, 2017 · 5 comments
Closed

Remove enableLoader and built-in loading status management from lazy #3963

steve3d opened this issue Sep 15, 2017 · 5 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@steve3d
Copy link
Contributor

steve3d commented Sep 15, 2017

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
Current version of datatable will show the loading indicator if it's enabled and will hide the the loading indicator when some data is loaded/fetched by the onLazyLoad event, In some cases, if there is no data at all, the loading indicator will never be hidden.

Under any situation, lazy loaded with no data is correct, but current design is no way to detect this. so when lazy load get no data at all, the loading indicator will never be hidden. In visual, this seems that the data load is never end, but the load process is correctly finished with just no data.

@xtoff
Copy link

xtoff commented Sep 26, 2017

I have the same issue, but made a simple workaround by assinging a empty array to my datatable value.

@tapaccos
Copy link

Hi thre xtoff ,could you mind explaining how?

I have tried checking for the length to the variable that the datatable is looking for and tried setting it to
[], null even undefined.
The weird thing is that the empty message is shown on table yet spinning still going on

@xtoff
Copy link

xtoff commented Sep 28, 2017

@tapaccos In my loadLazy function (onLazyLoad), I set the value of my datatable [], the first time when this function is called. But in my case there is no data loaded on page load. Only when I click a search button. Maybe you should check if your value binded to your datatable is empty and set it [] in your lazy load function?

@ejamsa
Copy link

ejamsa commented Oct 3, 2017

Another solution would be to set lazy to false and use loading property instead.

@cagataycivici cagataycivici added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working Status: Pending Review Issue or pull request is being reviewed by Core Team labels Oct 20, 2017
@cagataycivici cagataycivici added this to the 4.2.3 milestone Oct 20, 2017
@cagataycivici cagataycivici changed the title [pDataTable] loading indicator will never hidden when there is no data loaded by lazy. loading indicator will never hidden when there is no data loaded by lazy. Oct 20, 2017
@cagataycivici
Copy link
Member

So when there is no data to load, change detection is not triggered so loading indicator is not turned off, I guess best solution is removing the built-in loading for lazy mode and let the page author manage it manually.

@cagataycivici cagataycivici changed the title loading indicator will never hidden when there is no data loaded by lazy. Remove built-in loading status management from lazy Oct 24, 2017
@cagataycivici cagataycivici changed the title Remove built-in loading status management from lazy Remove enableLoader and built-in loading status management from lazy Oct 24, 2017
@cagataycivici cagataycivici self-assigned this Oct 24, 2017
@cagataycivici cagataycivici added confirmed and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

5 participants