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
5 answers

React material-table column resizable

I want to know how to make material-table column resize in react. Please help me. I've tried the following code options={{ sorting:false, resizable:true,
Dream
  • 45
  • 1
  • 1
  • 5
3
votes
2 answers

How to format numeric cells with the thousands separator (e.g. 412,335 not 412335) in a React material-table

On a Material-Table, the columns have a property type which can be Data type: 'boolean', 'numeric', 'date', 'datetime', 'time', 'currency' I tried numeric but it didn't format large numbers with commas. For example, instead of "412335" I need to…
Michael Osofsky
  • 11,429
  • 16
  • 68
  • 113
3
votes
3 answers

How to add "plus-button" on top right in material-table for react and call my specific function in react

This is my code: import React, { useState, useEffect } from 'react'; import { Fade } from "@material-ui/core"; import MaterialTable from 'material-table'; import { makeStyles } from '@material-ui/core/styles'; import './styles.css'; const…
D. Watson
  • 253
  • 1
  • 6
  • 20
3
votes
3 answers

How to style (add css) to material-table (React)?

I've been searching for a few days now and can't find anything. I'm using material-table in React but can't figure how to add css in headers (columns of the table) and the content [like changing font size, width and making table rows of striped…
Samidha Verma
  • 53
  • 1
  • 1
  • 6
3
votes
1 answer

how to put a custom button tag in rows, use material-table and typeScript, and what are the props he expects to receive?

i have some questions :) i try to put an Avatar tag in every row in my table and edit Button, and its take the edit button to both. How can I move an action to the right side of the table? How do I undo the title of "Actions" at the top of the…
3
votes
1 answer

How show menu item in Material Table

I tried the material table and wanted to add a menu item in the action, so that it doesn't display too many actions like edit, delete. I have a problem displaying the menu item. Example code:
3
votes
2 answers

material-table: How to make a summary row?

How can I make a summary row like this using a material table? Please help me, thank you.
Jargalan
  • 81
  • 2
  • 3
3
votes
1 answer

render a switch button on in material table when i am editing

hi guys i am using material table : (the switch is from material-ui, a simple toggle button) columns: {[{ title: 'Name', field: 'name' }, { title: 'Status', field: 'status', type: 'boolean', render: rowData =>
3
votes
1 answer

How do I group by a value in a nested object in ReactJS material-table?

Let's say I have an array of people with a nested object company and I want to be able to group by company.name in the Material-Table. const people = [ {name: 'John', company: {name: 'Google'}}, {name: 'Chad', company: {name: 'Google'}}, …
Luiz Domingues
  • 349
  • 7
  • 13
3
votes
3 answers

react-material table with typescript shows generic type error

I'm trying to run react-material under a Typescript project. Since I'm newbie with Typescript I got some errors I don't know how to solve them. In this guest I'm trying to create a reusable React component. (Please open the guest to see the full…
Zied Hf
  • 491
  • 3
  • 10
  • 30
3
votes
1 answer

How to adjust the width of the Material Table?

I am using material-table and I would like to know if there is any way to adjust the width of this table. I have a table with only two columns and I can't get it to spread across the entire screen. Try as follows without result.
Maite Perez
  • 358
  • 2
  • 3
  • 11
3
votes
1 answer

How add yup or validation material-table

I'm using the material-table library: https://material-table.com/#/ I created a reusable component, so I created a table with a column and a data. I set up the edition and the update. however, I find myself having to manage in BACK the verification…
Paul Hub
  • 141
  • 1
  • 9
3
votes
2 answers

material-table How do I select a row changing the background color upon selection

Using the material-table library. I would like to replicate the behavior shown in this example. https://codesandbox.io/s/table-hover-colors-zw9nt https://www.npmjs.com/package/material-table https://material-table.com/#/ I was thinking of using…
Udesh
  • 1,919
  • 3
  • 20
  • 26
3
votes
2 answers

How to control programmatically the toggling of a row?

I'm using MaterialTable with REACT (Datatable for React based on Material-UI Table. material-table.com) more precisely the detailed-panel - material-table.com/#/docs/features/detail-panel What do I need? user should open/close detailed panels and…
yahu
  • 31
  • 1
  • 2
3
votes
1 answer

React Material table editing using hooks

I am trying to edit/delete a row in material table using react hooks. although I can see that the state is being modified, it does not re-render the material table. the useeffect is not firing after the setdata. import React, { useState, useEffect }…
Amey Karekar
  • 53
  • 1
  • 3