Coder Social home page Coder Social logo

Comments (4)

jouni avatar jouni commented on September 22, 2024

I think the warning can be safely ignored, although it is annoying. We can see if we can get rid of that completely.

The second issue sounds more like it’s an actual problem. Can you share the code which causes it?

from vaadin-grid.

WilliamQAFE avatar WilliamQAFE commented on September 22, 2024

I'm having the same issues when trying to use the vaadin-grid component in my Polymer application.
The header is rendered but the contents remain empty.

Code relevant to the issue:
inside my template I have a v-grid element:

...
<v-grid>
  <table>
    <col name="date" header-text="Date">
    <col name="time" header-text="Time">
    <col name="action" header-text="Action">
    <col name="creditsLeft" header-text="Available Credits">
    <col name="fileName" header-text="Description">
  </table>
</v-grid>
...

(I have also tried different approaches such as using index. as a prefix for the names)

iron-ajax element which is fired asynchronously from another location (so not on ready).

...
<iron-ajax handle-as="json"
       method="GET"
       on-response="handleCreditEntriesResponse"
       response="{{creditsEntriesResponse}}"
       headers="{{headers}}"
       loading="{{loading}}"
       on-error="onCreditsEntriesError"
       content-type="application/json"
       id="conversionHistoryAjax">
</iron-ajax>
...

Inside my Polymer({}) definitions:

...
handleCreditEntriesResponse: function(creditsEntriesResponse) {
  ...
  var grid = document.querySelector('v-grid');
  grid.source = creditsEntriesResponse.detail.response;
  ...
}
...

Also, in your tutorials you use grid.data.source but this causes a 'data' undefined error.
I have tried with "inline" data and I can't seem to get that to work either (I used the format specified in the vaadin-grid-doc.html document).

from vaadin-grid.

jouni avatar jouni commented on September 22, 2024

Hi @WilliamQAFE,

The document.write is irrelevant for your issue, it’s just a warning, and we know about it and it doesn’t affect the functionality of the component.

The reason for grid.data being undefined is most likely because you try to access it before the custom element is upgraded and the component API is available. grid.source will definitely not do anything.

What version of vaadin-components are you using? Be sure to use the latest 0.3.0-beta1, since we fixed a major asynchronous loading issue related to the element upgrading on polyfilled browsers in that version. The current version you get from bower without specifying a version number is 0.2.1.

from vaadin-grid.

WilliamQAFE avatar WilliamQAFE commented on September 22, 2024

We are using the latest 0.3.0-beta1 version indeed.

I got the data.source thing to work if I set it in the ready function. So all is well.
Thanks for the feedback!

from vaadin-grid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.