File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
plugins/plugin-codeflare-dashboard/src/components/Top Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -82,13 +82,18 @@ class Top extends React.PureComponent<Props, State> {
8282 return ( ( n % d ) + d ) % d
8383 }
8484
85+ /** Indicates the absence of a job selection */
86+ private get NO_SELECTION ( ) {
87+ return - 1
88+ }
89+
8590 /** Do we have a selected group? */
8691 private get hasSelection ( ) {
8792 return this . state ?. selectedGroupIdx >= 0 && this . state ?. selectedGroupIdx < this . state . groups . length
8893 }
8994
9095 private clearCurrentJobSelection ( ) {
91- this . setState ( { selectedGroupIdx : - 1 } )
96+ this . setState ( { selectedGroupIdx : this . NO_SELECTION } )
9297 }
9398
9499 /** Current cluster context */
@@ -208,6 +213,7 @@ class Top extends React.PureComponent<Props, State> {
208213 this . setState ( {
209214 groups : [ ] ,
210215 updateError : null ,
216+ selectedGroupIdx : this . NO_SELECTION ,
211217 watcher : await this . props . initWatcher ( context , this . onData ) ,
212218 rawModel : Object . assign ( { hosts : [ ] , stats : this . emptyStats } , context ) ,
213219 } )
You can’t perform that action at this time.
0 commit comments