File tree 2 files changed +11
-2
lines changed
packages/sanity/src/core/form
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,9 @@ export function PortableTextInput(props: PortableTextInputProps) {
65
65
hotkeys,
66
66
markers = EMPTY_ARRAY ,
67
67
onChange,
68
- onEditorChange,
69
68
onCopy,
69
+ onEditorChange,
70
+ onFullScreenChange,
70
71
onInsert,
71
72
onItemRemove,
72
73
onPaste,
@@ -122,9 +123,11 @@ export function PortableTextInput(props: PortableTextInputProps) {
122
123
} else {
123
124
telemetry . log ( PortableTextInputCollapsed )
124
125
}
126
+
127
+ onFullScreenChange ?.( next )
125
128
return next
126
129
} )
127
- } , [ telemetry ] )
130
+ } , [ onFullScreenChange , telemetry ] )
128
131
129
132
// Reset invalidValue if new value is coming in from props
130
133
useEffect ( ( ) => {
Original file line number Diff line number Diff line change @@ -512,6 +512,12 @@ export interface PortableTextInputProps
512
512
* Returns changes from the underlying editor
513
513
*/
514
514
onEditorChange ?: ( change : EditorChange , editor : PortableTextEditor ) => void
515
+ /**
516
+ * Optional callback for when the editor goes into or out of full screen mode
517
+ * @hidden
518
+ * @beta
519
+ */
520
+ onFullScreenChange ?: ( isFullScreen : boolean ) => void
515
521
/**
516
522
* Custom copy function
517
523
*/
You can’t perform that action at this time.
0 commit comments