OntimizeWeb/ontimize-web-ngx

o-list component queries

Closed this issue · 1 comments

What is the current behavior?

We have an o-list component, with pagination enabled.
We use its queryData() method with a filter and everything works perfectly. If you change that filter, and launch the request again, the startIndex is increased, but it should not, because it is a different query.

Affected versions:

  • ontimize-web-ngx: 8.5.10

Hi @adrian-carneiro-imatia,

In the paginated o-list, if it does not have pagination controls, the data is concatenated to the data it currently has.
If the query data is launched by command, it is necessary to add

list.setDataArray([]);
list.queryData(filtro, {offset:0})