Git Product home page Git Product logo

Comments (4)

David-Mulder avatar David-Mulder commented on July 3, 2024

Nope, but you can simply do

<paper-datatable-column header="Info Object" type="Object" property="infoObject">
  <template>
    {{value.prop1}}
  </template>
</paper-datatable-column>

the array example is a LOT harder though due to the way Polymer works (stuff like array.0 isn't allowed in bindings although it sort of worked in the past). You would have to set up a getItem function on your <paper-datatable-column> and then write

<paper-datatable-column header="Info Array" property="infoArray">
  <template>
    {{getItem(infoArray,0)}}
  </template>
</paper-datatable-column>

and even that wouldn't allow two way binding (you would need to use <array-selector> or a <dom-repeat> for that).

from paper-datatable.

NamTThai avatar NamTThai commented on July 3, 2024

Agree with the array part. That's pretty irrelevant.

Object binding doesn't work with sorting, btw. The sort function will compare Object instead of Object.prop1. What do you think about this?

from paper-datatable.

David-Mulder avatar David-Mulder commented on July 3, 2024

@NamTThai Totally aware of that, so that's what the sort attribute is for ;-) , check the 'sorting & type system' demo for that (the object column): http://david-mulder.github.io/paper-datatable/components/paper-datatable/demo/sorting.html

from paper-datatable.

NamTThai avatar NamTThai commented on July 3, 2024

Awesome!

from paper-datatable.

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.