sistent icon indicating copy to clipboard operation
sistent copied to clipboard

`ResponsiveDataTable` bug and readme updates

Open dottharun opened this issue 1 year ago β€’ 2 comments

Current Behavior

  • This minimal example, does'nt render the table and columns prop is ignored.
import { ResponsiveDataTable } from "@layer5/sistent";

function App() {
  const columns = [
    { name: "name", label: "Name" },
    { name: "company", label: "Company" },
    { name: "city", label: "City" },
    { name: "state", label: "State" },
  ];

  const data = [
    ["Joe James", "Test Corp", "Yonkers", "NY"],
    ["John Walsh", "Test Corp", "Hartford", "CT"],
    ["Bob Herm", "Test Corp", "Tampa", "FL"],
    ["James Houston", "Test Corp", "Dallas", "TX"],
  ];

  const colVis = { name: true, company: false, city: true, state: true };

  return (
    <>
      <ResponsiveDataTable
        data={data}
        columns={columns}
        columnVisibility={colVis}
      />
    </>
  );
}

export default App;

image

  • From the implementation tableCols prop seems to be required to render the Table.
  • Even with tableCols prop, columnVisibility seems to be ignored.
import { ResponsiveDataTable } from "@layer5/sistent";

function App() {
  const columns = [
    { name: "name", label: "Name" },
    { name: "company", label: "Company" },
    { name: "city", label: "City" },
    { name: "state", label: "State" },
  ];

  const data = [
    ["Joe James", "Test Corp", "Yonkers", "NY"],
    ["John Walsh", "Test Corp", "Hartford", "CT"],
    ["Bob Herm", "Test Corp", "Tampa", "FL"],
    ["James Houston", "Test Corp", "Dallas", "TX"],
  ];

  const colVis = { name: true, company: false, city: true, state: true };

  return (
    <>
      <ResponsiveDataTable
        data={data}
        tableCols={columns}  //should be optional
        columns={columns}
        columnVisibility={colVis}
      />
    </>
  );
}

export default App;

image

Expected Behavior

  • For each of these parameters - columns, tableCols, columnVisibility, Correct the implementation/readme to reflect correct behaviour.

Screenshots/Logs

Environment

  • Host OS: Mac Linux Windows
  • Platform: Docker or Kubernetes
  • Meshery Server Version: stable-v
  • Meshery Client Version: stable-v

Contributor Guides and Resources

dottharun avatar Jun 02 '24 07:06 dottharun

Hii ! I would like to work on this !

MrPhenomenal3110 avatar Jul 26 '24 16:07 MrPhenomenal3110

@dottharun Can I work on this if it is not assigned to @MrPhenomenal3110 ?

kamnajain06 avatar Oct 05 '24 15:10 kamnajain06