3

Hi i am using material table in react project. I want to add a checkbox in my table cell. For example in Birth year colume in place of 1987. How to achieve that?

https://codesandbox.io/s/material-demo-forked-5h51b?file=/demo.js:701-911

enter image description here

<MaterialTable
      title="Editable Example"
      columns={state.columns}
      data={state.data}
      options={{
        selection: true
      }}
      editable={{
       //Edit Code here
      }}
    />

1 Answer 1

2

I found the answer... In column just add type:'boolean'. For eg,

    {
      title: "Unit",
      field: "unit",
      type: 'boolean',
      
    },
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.