-
Notifications
You must be signed in to change notification settings - Fork 194
Closed
Description
According to the type information provided by react-codemirror2, the onSelection callback is defined as follows:
onSelection?: (editor: IInstance, ranges: ISetSelectionOptions) => void;
... where ISetSelectionOptions is defined as:
export interface ISetSelectionOptions {
anchor: codemirror.Position;
head: codemirror.Position;
}
However, when the listener is actually fired during runtime, the object I receive as the ranges parameter does not match the type outlined above. It is:
It's an object with a property ranges, which in turn is an array of ISetSelectionOptions.
I am using:
react-codemirror2: 3.0.3codemirror: 5.31.0
Metadata
Metadata
Assignees
Labels
No labels
