How to use the react-virtualized/dist/commonjs/Table.SortDirection.ASC function in react-virtualized

To help you get started, we’ve selected a few react-virtualized examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github erlanglab / erlangpl / ui / src / plugins / epl-ets / components / TableView.js View on Github external
constructor(props: any) {
    super(props);
    this.state = {
      sortBy: 'name',
      sortDirection: SortDirection.ASC,
      selectLabel: 'Select columns to show',
      selectOptions: [
        { value: 'id', label: 'ID' },
        { value: 'memory', label: 'Memory' },
        { value: 'size', label: 'Size' },
        { value: 'type', label: 'Type' },
        { value: 'write_concurrency', label: 'Write concurrency' },
        { value: 'read_concurrency', label: 'Read concurrency' },
        { value: 'lookup_max', label: 'lookup max time' },
        { value: 'lookup_count', label: 'lookup count' },
        { value: 'insert_max', label: 'insert max time' },
        { value: 'insert_count', label: 'insert count' },
        { value: 'owner', label: 'Owner' },
        { value: 'heir', label: 'Heir' },
        { value: 'protection', label: 'Protection' }
      ],
github erlanglab / erlangpl / ui / src / plugins / epl-ets / components / TableView.js View on Github external
sort(listOfObjects: Array<*>) {
    if (this.state.sortDirection === SortDirection.ASC) {
      return listOfObjects.sort(this.propComparatorASC(this.state.sortBy));
    } else {
      return listOfObjects.sort(this.propComparatorDESC(this.state.sortBy));
    }
  }