Smart-Table icon indicating copy to clipboard operation
Smart-Table copied to clipboard

Problem with st-pipe

Open YamilBracho opened this issue 9 years ago • 1 comments

Hi, everybody

I am using st-pipe to load some data records from my server. When the screen is showm, the grid must be empty so the st-pipe function (say list) is not called (Whne it is called but i use a falg to return inmediately). The user enter some criteria in a modal dialog and then I call "list" in the ng-click clause of that button. the problem is that the pagination is not shown. If I force to call list() the first time, the pagiantion is shown as I retrieved all the data rows.

Is there a way to refresh the inner vars of smart-table ?

I am using Angular 1.6, Smart-Table 2.1.8

TIA, Yamil

YamilBracho avatar Apr 05 '17 14:04 YamilBracho

Hello @YamilBracho,

if im right you want a page with a smart-table but it shouldn't get any data on page load. The table should only be filled when you click on a specific button? And your problem is that when you click on that button to fill the table the pagination isn't shown?

I think that you don't fill the necessary variables when you click on that button in your pipe. Be sure you filled them. Like you can see in the templateCache for the Smart-Table there is a ng-if

    <nav ng-if="numPages && pages.length >= 2"><ul class="pagination">

So numPagesneed to be filled and pages need to have at least two entries to show you the standard pagination.

If you need further investigation please provide us with a plunker example.

MrWook avatar Apr 06 '17 08:04 MrWook