Coder Social home page Coder Social logo

brainy-table's Introduction

Build Status Bower version Published on webcomponents.org

Demo and API docs

<brainy-table>

brainy-table is a Polymer 1.x data table element.

<iron-ajax auto url="demo/users.json" last-response="{{users}}"></iron-ajax>
<brainy-table items="[[users.data]]" page-size="5" details-enabled>
  <brainy-table-column name="First Name" filter-by="user.name.first" sort-by="user.name.first">
    <template>[[item.user.name.first]]</template>
  </brainy-table-column>
  <brainy-table-column name="Last Name" sort-by="user.name.last">
    <template>[[item.user.name.last]]</template>
  </brainy-table-column>
  <brainy-table-column name="Phone" sort-by="user.phone" align-right>
    <template>[[item.user.phone]]</template>
  </brainy-table-column>
  <brainy-table-column width="30px" align-right flex="0">
    <template>
      <template is="dom-if" if="[[!expanded]]">
        <iron-icon icon="icons:expand-more"></iron-icon>
      </template>
      <template is="dom-if" if="[[expanded]]">
        <iron-icon icon="icons:expand-less"></iron-icon>
      </template>
    </template>
  </brainy-table-column>
  <template is="row-detail">
    <div>[[item.user.location.street]], [[item.user.location.city]], [[item.user.location.state]]</div>
  </template>
  <div no-results>No records found</div>
</brainy-table>

Inspired by iron-data-table. Follows the guidelines of Material Design.

Features

  • Data filtering
  • Data sorting
  • Pagination
  • Template support for each column
  • Two-way binding support
  • Custom styling support for templates
  • Flex support for cells
  • Native Shadow DOM support
  • Column manipulation, resizing, hiding, reordering
  • Custom header templates
  • Row details
  • Disabling row details depending on item subproperty value
  • Horizontal scrolling shadows
  • "Drag-and-drop" scroll

Special use cases

  • Limited amount of data (for infinite scrolling, consider using iron-data-table instead)
  • Table shouldn't be explicitly sized (height depends on rows count)
  • Rows can include dropdown menus etc (no transform is used, so table does not create z-index trap)

brainy-table's People

Contributors

web-padawan avatar

Watchers

James Cloos avatar

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.