It looks like combining Date Range filter (Date and numeric filtering example) with Persistent State (saved to Local Storage) does not work nicely.
When refreshing the page, the filter is getting applied, but the input field stays blank.
Is there an easy way to make the Date Range filter to populate on page refresh?
@lorenzofox3 Thanks for your suggestion.
I set the total to a very large number.
Added logic to prevent clicking Next when response brings 0 items back.
Removed Jump to Last Page. Removed Jump to a Specific Page.
Now I can still paginate Left and Right and jump to First page.
Thank again!
ng-click
and calling a function when the table header field is clicked. Using the class of the header field, I can see whether the sort order is ascent
or descent
. But doing so involves a lot of hacks. If there is a cleaner way built into the smart table library, that would be great
yea looks like it. overriding the stPipe
function should do the trick. It contains information in the following format
"sort": {
"predicate": "id",
"reverse": false
},
"search": {},
"pagination": {
"start": 0,
"totalItemCount": 0
}
}
Examining this tableState
object, I can send the required calls to server and update the data in rowCollection
. This is awesome!
stPipe
function using some button ? The function gets triggered on search, sort action. I want to be able to trigger the same function using some buttons. These buttons serve as filter functions. I can write the function and bind it to ng-click of that button but not sure how to trigger the table's stPipe
function and how to access the tableState