Questions tagged [material-table]

material-table is a npm package that based on reactjs and material-ui.

material-table is a npm package that based on reactjs and material-ui. You can access its source code and documentation from github or its website.

731 questions
3
votes
2 answers

How I can access the cancellation handler from creating a new row in material-table for reactJS?

// index.js import React, { Component } from "react"; import MaterialTable, { MTableEditRow } from "material-table"; import axios from "axios"; import DataModel from "./DataModel"; import TitleInput from "./TitleInput"; class Report extends…
Isaac Pak
  • 4,467
  • 3
  • 42
  • 48
3
votes
3 answers

Is it possible to disable drag and drop for Material-Table?

Everything in Material-Table is working good, but I cant find the props / option to disable Drag and Drop for columns headings. I just need it to stay the same as it is provided in code This is how my columns and options props look like…
Vra3
  • 33
  • 1
  • 4
3
votes
1 answer

Adding component with material-table changes Material-UI AppBar style

My app is using Material-UI and material-table. A global theme is applied in the "index.js" file using "ThemeProvider" with as a child and then has children:
tw1742
  • 1,424
  • 4
  • 18
  • 37
3
votes
1 answer

How can I use tableRef.onRowSelected to update the UI via the onRowClick property?

I've written an onRowClick function to change the rows tableData.checked value when the row is click as seen in the answer here #300 I can see the checked state updating in a console log but the checkbox itself does not change visibly until I…
CalebC
  • 101
  • 1
  • 8
3
votes
1 answer

Is there a way that I can create a custom column with auto numbering in material-table?

I would like to generate a custom column that is based off of the api data that maintains the ordering even if rows are deleted. Like the image below but not with hard-coded numbers. The library i'm referencing is not angular-material-table but…
Isaac Pak
  • 4,467
  • 3
  • 42
  • 48
2
votes
0 answers

Why does React render functional component and JSX element differently?

When I assign a React component like this... }} /> ...or like this... CustomToolbar(props) }} /> ...it appears that React…
Fappaz
  • 3,033
  • 3
  • 28
  • 39
2
votes
1 answer

Set Material UI table default sorting

This should be much easier than what I'm seeing and I'm sure there is a better way. How can I set the default sorting of a Material UI table like the one below. I don't want a button at the top so the sorting can be changed, I want the table to…
Colin S
  • 123
  • 7
2
votes
1 answer

In React material tree table when i add a new row in tree table that row should be expand default

rows.find((a) => a.id === row.productId)} />
user19728229
2
votes
0 answers

How to mock material-table?

I am new to React Unit Testing. I am supposed to create unit tests for a file that uses an API to fetch data and then display it in MaterialTable and uses TablePagination (from Material UI) for pages. Here's the code for reference: import React, {…
2
votes
1 answer

Custom Pagination in Material-Table

I want to override the default pagination in Material-Table to look different, but keep the same default elements there. My override allows me to move between pages in the table, but I cannot change how many rows appear in the table. I cannot skip…
Ciaran Crowley
  • 425
  • 1
  • 4
  • 18
2
votes
2 answers

Is it possible to create different action button in mui tables?

I'm creating a table where the data will be fetched from api and displayed in the mui table or material table. I wanna show different action button to different rows like in the first row the button should display "connect" when I click on that…
2
votes
1 answer

How to make a certain column editable in material-table?

I am trying to make a certain column editable( name column ) in material table but it doesn't seem to work. the documentation aren't also that helpful. this is what I tried: My columns array: const headers=[ { title:"id", field:"id", }, …
2
votes
1 answer

How to style the cell edit component in material table?

So the thing is that I am trying to create an editable table using material-table library and when I click on a cell to edit its content, an edit component shows up on the cell and I want to style the component according to the table style but don't…
2
votes
1 answer

React material-table

this is my app.js code: import { BasicTable } from './tables/BasicTable'; import './App.css'; function App() { return (

pods table

); } export default App; and this is…
amit
  • 71
  • 2
  • 10
2
votes
1 answer

MUI - Material-table/core - Provided selection does not work on checkbox click

EDIT : This issue also concerns Material Ui's Data table. I tried using the same example as given by the documentation but the same problem occurs. I have been battling with an issue regarding the provided selection feature where, when I click on a…
coderdonezo
  • 399
  • 1
  • 12