File tree Expand file tree Collapse file tree
webapp/components/general Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ import Utils from '../../Utils';
77import { REAL_TYPE } from '../../constants' ;
88
99export default class NetPyNEField extends Component {
10+ constructor ( props ) {
11+ super ( props ) ;
12+ this . state = { open : false } ;
13+ }
1014 setErrorMessage ( value ) {
1115 return new Promise ( ( resolve , reject ) => {
1216 if ( this . realType === REAL_TYPE . FUNC ) {
@@ -47,6 +51,10 @@ export default class NetPyNEField extends Component {
4751 return value ;
4852 }
4953
54+ handleTooltip ( action ) {
55+ this . setState ( { open : action } ) ;
56+ }
57+
5058 render ( ) {
5159 const { id, children } = this . props ;
5260
@@ -126,8 +134,12 @@ export default class NetPyNEField extends Component {
126134 leaveTouchDelay = { 0 }
127135 disableTouchListener
128136 disableFocusListener
137+ open = { this . state . open }
129138 >
130- < Box mb = { 1 } width = "100%" >
139+ < Box mb = { 1 } width = "100%"
140+ onMouseEnter = { ( ) => { this . handleTooltip ( true ) } }
141+ onMouseLeave = { ( ) => { this . handleTooltip ( false ) } }
142+ onClick = { ( ) => { this . handleTooltip ( false ) } } >
131143 { childWithProp }
132144 </ Box >
133145 </ Tooltip >
You can’t perform that action at this time.
0 commit comments