mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-25 09:43:03 +00:00
fix ref issues and remove unneeded value
This commit is contained in:
@@ -60,12 +60,11 @@ const CodeEditor = createClass({
|
||||
|
||||
getInitialState : function() {
|
||||
return {
|
||||
docs : {},
|
||||
widgetUtils : {},
|
||||
widgets : [],
|
||||
focusedWidget : null,
|
||||
hints : [],
|
||||
hintsField : undefined,
|
||||
docs : {},
|
||||
widgetUtils : {},
|
||||
widgets : [],
|
||||
hints : [],
|
||||
hintsField : undefined,
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -87,8 +87,18 @@ const Hints = createClass({
|
||||
let className = 'CodeMirror-hint';
|
||||
if(activeHint === i) {
|
||||
className += ' CodeMirror-hint-active';
|
||||
return <li key={i}
|
||||
className={className}
|
||||
onMouseDown={(e)=>field.hintSelected(h, e)}
|
||||
ref={this.activeHintRef}>
|
||||
{h.hint}
|
||||
</li>;
|
||||
}
|
||||
return <li key={i} className={className} onMouseDown={(e)=>field.hintSelected(h, e)}>{h.hint}</li>;
|
||||
return <li key={i}
|
||||
className={className}
|
||||
onMouseDown={(e)=>field.hintSelected(h, e)}>
|
||||
{h.hint}
|
||||
</li>;
|
||||
});
|
||||
|
||||
let style = {
|
||||
@@ -103,7 +113,13 @@ const Hints = createClass({
|
||||
};
|
||||
}
|
||||
return <React.Fragment>
|
||||
<ul role={'listbox'} id={'hints'} aria-expanded={true} className={'CodeMirror-hints default'} style={style} onKeyDown={this.keyDown}>
|
||||
<ul role={'listbox'}
|
||||
id={'hints'}
|
||||
aria-expanded={true}
|
||||
className={'CodeMirror-hints default'}
|
||||
style={style}
|
||||
onKeyDown={this.keyDown}
|
||||
ref={this.hintsRef}>
|
||||
{hintElements}
|
||||
</ul>
|
||||
</React.Fragment>;
|
||||
|
||||
Reference in New Issue
Block a user