Datatable load on mobile

Hi all,
I’m working on a mobile app which show a datatable with one column. At the start of app I have used the load method to get a json file, when I filter by an external combo, sometime the datatable reload the json file duplicating all the rows. I can I tell to datatable to load the json file once? The subseguent load have the start=9&count=50&continue=true parameter set, and it’s strange because the first call has already load the entire file.
Thank you

Hi,

Can you please provide a code snippet where such behavior can be tested?

Hi Listopad,
it was problably my misuse of url property instead of data property, I learned that to load a small dataset it’s better to declare a global variable with data.
Now I have a strange behavior on scrolling, I can’t reproduce it on code snippet editor because it works on normal browser but not in android emulators and devices (I develop with VS 2015 community with Cordova Tools and Ripple Emulator and test on a couple of tablet and smartphone), it seems that when using external filtering on datatable, i.e.

        function reload() {
            var filter = '';
            var gen = $$('gen').getValue();
            if (gen == -1) {
                $$('list').filter();
            } else {
                $$('list').filter(function(obj) {
                    return obj.brand == gen;
                });
            }
        }

or

{
                    view: "search",
                    id: "search",
                    placeholder: "search...",
                    value: "",
                    on: {
                        onTimedKeyPress: function() {
                            $$('list').filter("description", this.getValue());
                        }
                    },
                    batch: "main"
                }

if the total rows returned are smaller than the total rows preceding the filtering, the datatable will result blank, but only if I have scrolled the preceding selection down of a few rows.

It works fine if I don’t scroll.

How can I reset the scrolling state after filtering?

Thank you

I found a workaround, I put following code lines before any filtering:

            $$('list').filter();
            $$('list').showItemByIndex(1);

BUT…

I found another issue: if I use the device keyboard, the datatable viewport area SHRINKS! It’s because the datatable is into a multiview? How can I avoid this?

No. I was wrong. I’m going crazy, sometime works, sometimes no. It’s sure that the same html webix page does not work the same for pc browser and android browser, maybe it’s Cordova

Yeah, finally I got it:

$$(‘list’).scrollTo(0, 0);

It was so simple, shame on me.

The keybord still shrinks the viewport area when don’t use the smartphone backbutton