how to add column in material-table with help of Component Overriding? - reactjs

I Want to use material-table to setup table where the last row will be used to show the calculated total of one column. as per the material-table doc, I guess I can use Component Overriding in Cell or Row.

Related

React MUI MS Word like add row functionality to Table

How could I implement an add row functionality for MUI's Table, sg like in MS Word, when you hover over a row and on the side a little plus icon appears and you can insert a row in that position?
I would also have to somehow connect it to react-hook-form's fieldarray.
I was wondering if it's even possible to add such a feature for MUI or it would be wiser to create it from the ground up using native html tags.

How to create multi row as header of Material UI Datatable

We are using Material UI and using <MUIDataTable> To display table.
We have multiple row as table header which is were we have to do colspan 2-3 columns also.
Looking for, How to customise table header column in a way that we can have multiple row as header.
I am new to React and Material UI, any hint or suggestions will also helpful.
Might help others...
Using customHeadRender we can customize table header column.
Here is example.
I used two div in on column and added line between these div.
Limitations: In my case sorting and searching on these(customized header) column are not required so no need to write logic for this but after customisation need to think about these functionality provide my MUi-datatable.

Adding an editable row to Antd Table?

With material-table they have a property to add an editable row where an empty, editable row to the table, accepting input. I would like to have the same behavior for Ant's Table component. You can find an example of that behavior here under the editable drop down toggle at the bottom: https://material-table.com/#/docs/features/editable They also have a property for setting the new row to be at the top which I also want..
Has anyone done this or seen this?
I currently have an editable Ant table but I'm not sure how I could merge the logic to add a row to the top of the table and then edit that row.
There is an example provided on Antd site https://ant.design/components/table/#components-table-demo-edit-row.
About Add button, you can easily add a new row with empty state

How to give different subComponent on Expanding different rows in React-table?

Have used Expander in one column of React-table. On expanding a different row of table i want to display different subComponents. My subComponent has another react-table. So the issue is when two rows are expanded , the subComponent react table gets the data source acc to the 2nd row and thus it updates the same in the 1st row subComponent as well. I want to have different data sources according to the row.
Also tell how to give Column accessor value with the Expander button in the same cell.
I have given the data dynamically to the subComponent react table that is doin fine.
you have to use React.CreateElement and pass your SubComponent And Separete Store (if exists)
for more information about creating dynamic component see React Site

react data grid with group by in columns

I am looking for a full feature(like editing,deleting,inserting,group by on columns,pagination and extra) data grid for reactjs.
after searching i have found react-bootstrap-table (http://allenfang.github.io/react-bootstrap-table/index.html) its has all of the features that i want except group by on columns. is there any other react data grid or any body knows how can i add group by in react-bootstrap-table?
You can use
https://facebook.github.io/fixed-data-table/
It has support of grouped column
https://facebook.github.io/fixed-data-table/api-columngroup-v0.5.html

Resources