How to create infinite scroll in Vuetify v-autocomplete by backend?

How to check when the scroll is down? And then upload more results by method initialize()?

Template:

        <v-autocomplete
          :items="items"
          item-text="name"
          item-value="id"
          label="Item List"
        ></v-autocomplete>

Script:

  data: () => ({
    items: [],
    page: 1
  }),
 methods: {
    initialize() {
      return ItemService.getItems(this.page)
        .then((response) => {
          this.items = response;
        })
        .catch((error) => {
          this.handleError(error, this.errors);
        });
    }
}

Source: Ask Javascript Questions

LEAVE A COMMENT