Skip to content

Table Sorting Issue #48

@s2t2

Description

@s2t2

Hi, thanks for the cool sortable table component. The code referenced here https://mdbootstrap.com/docs/react/tables/sort/ produces a table, and when you click on a column it sorts ascending on that column, but subsequent clicks don't sort descending.

Please advise. Thanks. Details below.

Versions:

  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.5.0",
    "@testing-library/user-event": "^7.2.1",
    "mdbreact": "^4.27.0",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-scripts": "3.4.3"

Code:

import React from 'react';
import { MDBDataTable } from 'mdbreact';

const DatatablePage = () => {
  const data = {
    // abbreviated :-D
  };

  return (
    <MDBDataTable
      striped
      bordered
      small
      data={data}
    />
  );
}

export default DatatablePage;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions