How to avoid react material-table column from editing

To avoid this there are two option at “editable” props of material table

editable: “never” and editable: “onUpdate” as its clear it could be chosen when a column should be editable

columns: [

{ title: “Name”, field: “name”, editable: “onUpdate” },

{ title: “Surname”, field: “surname”, editable: “never” },

{ title: “Birth Year”, field: “birthYear”, type: “numeric” },

{

title: “Birth Place”,

field: “birthCity”,

lookup: { 34: “İstanbul”, 63: “Şanlıurfa” }

}

]

Leave a Comment