material-table icon indicating copy to clipboard operation
material-table copied to clipboard

How to change color of checkbox material table ReactJS

Open priyankdeeps78 opened this issue 6 years ago • 2 comments

Help

I am using Material table in my project and want to change color of checkbox on selection.

function BasicSelection() {
  return (
    <MaterialTable
      title="Basic Selection Preview"
      columns={[
        { title: 'Name', field: 'name' },
        { title: 'Surname', field: 'surname' },
        { title: 'Birth Year', field: 'birthYear', type: 'numeric' },
        {
          title: 'Birth Place',
          field: 'birthCity',
          lookup: { 34: 'İstanbul', 63: 'Şanlıurfa' },
        },
      ]}
      data={[
        { name: 'Mehmet', surname: 'Baran', birthYear: 1987, birthCity: 63 },
        { name: 'Zerya Betül', surname: 'Baran', birthYear: 2017, birthCity: 34 },
      ]}        
      options={{
        selection: true
      }}
    />
  )
}

priyankdeeps78 avatar Oct 19 '20 09:10 priyankdeeps78

@PriyankDeep I think you need to change secodary color of the Material-UI theme :) https://material-ui.com/customization/theming/#main-content

vmihalachi avatar Oct 19 '20 09:10 vmihalachi

Thanks for the reply... It worked

priyankdeeps78 avatar Oct 19 '20 11:10 priyankdeeps78