@@ -65,6 +65,7 @@ export interface CellInputProps {
65
65
cell_toolbar ?: string ;
66
66
trust ?: boolean ;
67
67
is_readonly : boolean ;
68
+ input_is_readonly : boolean ;
68
69
is_scrolling ?: boolean ;
69
70
id : string ;
70
71
index : number ;
@@ -103,14 +104,14 @@ export const CellInput: React.FC<CellInputProps> = React.memo(
103
104
actions = { props . actions }
104
105
id = { props . id }
105
106
dragHandle = { props . dragHandle }
106
- read_only = { props . is_readonly }
107
+ read_only = { props . input_is_readonly }
107
108
/>
108
109
</ HiddenXS >
109
110
) ;
110
111
}
111
112
112
113
function handle_md_double_click ( ) : void {
113
- if ( props . is_readonly ) {
114
+ if ( props . input_is_readonly ) {
114
115
return ;
115
116
}
116
117
frameActions . current ?. switch_md_cell_to_edit ( props . cell . get ( "id" ) ) ;
@@ -132,7 +133,7 @@ export const CellInput: React.FC<CellInputProps> = React.memo(
132
133
opt = opt . set ( "foldGutter" , false ) ;
133
134
break ;
134
135
}
135
- if ( props . is_readonly ) {
136
+ if ( props . input_is_readonly ) {
136
137
opt = opt . set ( "readOnly" , true ) ;
137
138
}
138
139
if ( props . cell . get ( "line_numbers" ) != null ) {
@@ -152,7 +153,7 @@ export const CellInput: React.FC<CellInputProps> = React.memo(
152
153
return (
153
154
< CodeMirror
154
155
actions = {
155
- props . is_readonly ? undefined : props . actions
156
+ props . input_is_readonly ? undefined : props . actions
156
157
/* Do NOT pass in actions when read only, since having any actions *defines*
157
158
not read only for the codemirror editor; also, it will get created with
158
159
potentially the same id as a normal cell, hence get linked to it, and
@@ -189,7 +190,7 @@ export const CellInput: React.FC<CellInputProps> = React.memo(
189
190
if (
190
191
props . actions == null ||
191
192
props . cell . getIn ( [ "metadata" , "editable" ] ) === false ||
192
- props . is_readonly
193
+ props . input_is_readonly
193
194
) {
194
195
return ;
195
196
}
@@ -244,7 +245,7 @@ export const CellInput: React.FC<CellInputProps> = React.memo(
244
245
< MostlyStaticMarkdown
245
246
value = { value }
246
247
onChange = { ( value ) => {
247
- if ( props . is_readonly ) {
248
+ if ( props . input_is_readonly ) {
248
249
return ;
249
250
}
250
251
// user checked a checkbox.
@@ -430,6 +431,7 @@ export const CellInput: React.FC<CellInputProps> = React.memo(
430
431
cell = { props . cell }
431
432
is_current = { props . is_current }
432
433
is_readonly = { props . is_readonly }
434
+ input_is_readonly = { props . input_is_readonly }
433
435
computeServerId = { props . computeServerId }
434
436
llmTools = { props . llmTools }
435
437
haveLLMCellTools = { haveLLMCellTools }
@@ -490,6 +492,7 @@ export const CellInput: React.FC<CellInputProps> = React.memo(
490
492
next . font_size !== cur . font_size ||
491
493
next . complete !== cur . complete ||
492
494
next . is_readonly !== cur . is_readonly ||
495
+ next . input_is_readonly !== cur . input_is_readonly ||
493
496
next . is_scrolling !== cur . is_scrolling ||
494
497
next . cell_toolbar !== cur . cell_toolbar ||
495
498
( next . llmTools ?. model ?? "" ) !== ( cur . llmTools ?. model ?? "" ) ||
0 commit comments