Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsivenes Stacked not working #2032

Open
bloodykheeng opened this issue Apr 12, 2024 · 0 comments
Open

Responsivenes Stacked not working #2032

bloodykheeng opened this issue Apr 12, 2024 · 0 comments

Comments

@bloodykheeng
Copy link

bloodykheeng commented Apr 12, 2024

"mui-datatables": "^4.3.0",
"@mui/icons-material": "^5.14.7",
"@mui/material": "^5.14.7","react": "^17.0.1",
"react-dom": "^17.0.1",

Thats my enviroment ive noted stacked isnt working unless i have to put a FormControl component in my return even though am not using it if i remove it stacked stops rendering well in the ui

here is my whole component

import React from "react";
import MUIDataTable from "mui-datatables";
import { IconButton } from "@mui/material";
import VisibilityIcon from "@mui/icons-material/Visibility";
import EditIcon from "@mui/icons-material/Edit";
import DeleteIcon from "@mui/icons-material/Delete";
import FormControl from "@mui/material/FormControl";

// bk always remenber the stacked only works if there is a form control in the return

const MuiDataTable = ({ tableData, tableColumns, handleViewPage, handleShowEditForm, handleDelete }) => {
// Dynamically adding the Actions column
const columns = tableColumns.concat({
name: "Actions",
label: "Actions",
options: {
filter: false,
sort: false,
empty: true,
customBodyRenderLite: (dataIndex) => {
const dataRow = tableData[dataIndex];
return (


<IconButton onClick={() => handleViewPage(dataRow)}>


<IconButton onClick={() => handleShowEditForm(dataRow)}>


<IconButton onClick={() => handleDelete(dataRow)}>



);
},
},
});

const options = {
    filterType: "checkbox",
    responsive: "simple",
    selectableRows: "none", // set to 'multiple' if selection is needed
};

return (
    <>
        <FormControl></FormControl>
        <MUIDataTable title={"User List"} data={tableData} columns={columns} options={options} />
    </>
);

};

export default MuiDataTable;

this realy needs to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant