mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-27 18:13:08 +00:00
fix ref issues and remove unneeded value
This commit is contained in:
@@ -63,7 +63,6 @@ const CodeEditor = createClass({
|
|||||||
docs : {},
|
docs : {},
|
||||||
widgetUtils : {},
|
widgetUtils : {},
|
||||||
widgets : [],
|
widgets : [],
|
||||||
focusedWidget : null,
|
|
||||||
hints : [],
|
hints : [],
|
||||||
hintsField : undefined,
|
hintsField : undefined,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -87,8 +87,18 @@ const Hints = createClass({
|
|||||||
let className = 'CodeMirror-hint';
|
let className = 'CodeMirror-hint';
|
||||||
if(activeHint === i) {
|
if(activeHint === i) {
|
||||||
className += ' CodeMirror-hint-active';
|
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 = {
|
let style = {
|
||||||
@@ -103,7 +113,13 @@ const Hints = createClass({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
return <React.Fragment>
|
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}
|
{hintElements}
|
||||||
</ul>
|
</ul>
|
||||||
</React.Fragment>;
|
</React.Fragment>;
|
||||||
|
|||||||
Reference in New Issue
Block a user