Skip to content

Instantly share code, notes, and snippets.

View dnkodi's full-sized avatar

Duleep Kodithuwakku dnkodi

View GitHub Profile
@dnkodi
dnkodi / Semantic-UI-Table-Element.jsx
Last active March 7, 2017 17:57 — forked from UnbrandedTech/Semantic-UI-Table-Element.jsx
pop will remove the last element and hence it will be not shown in the table
import React, { Component, PropTypes } from 'react'
import { Table, Menu, Icon, Segment, Input } from 'semantic-ui-react'
class TableElement extends React.Component {
constructor(props) {
super(props);
this.data = props.data
this.renderRow = props.renderBodyRow || this.defaultRenderBodyRow
this.headerRow = props.headers || Object.keys(this.data[0] || []);
this.currentIndex = 0