Data Table


import * as React from "react";
import { withNamespaces } from 'react-i18next';
import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table';

var products = [{
   .....
}, {
    .....
}];
class SortTable extends React.Component {
    constructor(props) {
        super(props);
        this.options = {
          defaultSortName: 'name',  // default sort column name
          defaultSortOrder: 'desc'  // default sort order
        };
      }
    render() {
        return (
            <BootstrapTable data={ products } options={ this.options }>
                <TableHeaderColumn dataField='id' isKey dataSort>....../TableHeaderColumn>
            </BootstrapTable>
        );
    }
}
export default withNamespaces()(SortTable);

results matching ""

    No results matching ""