Well firstly, tell me am I going down the right rabbit hole?
I am building a new PWA which will firstly be designed for Mobile,
I have built my back-end API and I am working on my front end. I am using Polymer 3 with a Vaadin-Grid at the moment.
What I am trying to do is get the list to infinitely scroll which should be quiet simple but I keep getting no where with examples.
Can anyone point me in the right direction?
import { PolymerElement, html } from '@polymer/polymer/polymer-
element.js';
import '@polymer/iron-ajax/iron-ajax.js';
import '@vaadin/vaadin-grid/vaadin-grid.js';
import './shared-styles.js';
class MyView1 extends PolymerElement {
static get template() {
return html`
<style include="shared-styles">
:host {
display: block;
padding: 10px;
}
</style>
<div class="card">
<div class="circle">
</div>
<h1>View One</h1>
<vaadin-grid aria-label="Basic Binding Example" items="[[data]]">
<vaadin-grid-column>
<template class="header">RecordID</template>
<template>[[item.recordID]]</template>
</vaadin-grid-column>
<vaadin-grid-column>
<template class="header">File Ref</template>
<template>[[item.fileRef]]</template>
</vaadin-grid-column>
<vaadin-grid-column>
<template class="header">Description</template>
<template>[[item.description]]</template>
</vaadin-grid-column>
</vaadin-grid>
</div>
`;
}
connectedCallback(){
super.connectedCallback();
fetch('http://localhost:56132/api/matters')
.then(r => r.json())
.then(data => this.data = data);
}
}
window.customElements.define('my-view1', MyView1);