readonly
Description
Optional. Controls whether editing, adding, selecting, and dragging cards are enabled or disabled.
Usage
readonly?: boolean;
//or
readonly?: {
edit?: boolean,
add?: boolean,
select?: boolean,
dnd?: boolean
};
Parameters
There are two ways to set up the readonly mode: using a short or an extended configuration.
The short option:
readonly- (optional) toggles the readonly mode for Kanban on or off.
The extended option:
readonly- (optional) an object with detailed settings, where you can specify:edit- (optional) enables or disables editing of cardsadd- (optional) enables or disables adding new cardsselect- (optional) enables or disables selecting cardsdnd- (optional) enables or disables dragging cards
Default config
readonly: false // readonly mode is off by default
//or
readonly: {
edit: true, // editing is allowed
add: true, // adding is allowed
select: true, // selecting is allowed
dnd: true // dragging is allowed
}
Example
new kanban.Kanban("#root", {
cards,
columns,
readonly: {
edit: false, // editing is turned off
add: true, // adding is turned on
select: false, // selecting is turned off
dnd: true // dragging is turned on
},
// other parameters
});
Related sample: Readonly mode