SplitEditor not showing annotations
jameso-tx opened this issue · comments
Describe the bug
Annotation object not displaying in gutter for SplitEditor. However, same code will display annotation when using AceEditor. When inspecting the html for the SplitEditor, there is no tabindex: "-1" class="ace_gutter_annotation" or other associated elements to display in either text-area as found in the ace-builds/ace.js.
ace-builds": {"version": "1.33.2"}
react-ace": {"version": "10.1.0"}
Expected Behavior
Thank you in advance for your time. I am not sure if this is a code thing or an actual issue, but was hoping to see the annotations in the editor. Please see the following SplitEditor configuration in the React Component.
<SplitEditor
name="UNIQUE_ID_OF_DIV"
height="500px"
width="inherit"
mode="text"
theme="github"
splits={2}
orientation="beside"
value={this.state.editorArray ? this.state.editorArray : ["",""]}
annotations={[{row: 0, column: 2, type: 'error', text: 'Some error.'},{ row: 2, column: 4, type: 'error', text: 'Some other error.'}]}
setOptions={{ useWorker: false }}
onChange={(event) => {
this.setState({editorArray: event});
}}
/>
console output from split.js showing the session annotation is populated
session.$annotations { "row": 2, "column": 4, "type": "error", "text": "Some other error." }
I have tried many 'tricks' before posting so as to be respectful of your time, but was unable to make them display. Thank you again for any input or direction. Please let me know if more detail is needed or if I can help further.
Current Behavior
Annotations were not displayed in the gutters. Unfortunately I can find no errors in console.
Reproduction Steps
Refreshed browser using SplitEditor react component
Possible Solution
No response
Additional Information/Context
No response
Ace Version / Browser / OS / Keyboard layout
ace-builds": {"version": "1.33.2"}, react-ace": {"version": "10.1.0"} , Chrome Version 124.0.6367.119 (Official Build) (arm64)
Update: After some messing around I was able to get the annotation to display for the SplitEditor using an array of arrays, as clearly marked in the documentation. My apologies for any bother.