File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/internal-packages/schema/lib/component Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1
1
const app = require ( 'hadron-app' ) ;
2
2
const React = require ( 'react' ) ;
3
+ const SchemaActions = require ( '../action' ) ;
3
4
const SchemaStore = require ( '../store' ) ;
4
5
const StateMixin = require ( 'reflux-state-mixin' ) ;
5
6
const Field = require ( './field' ) ;
@@ -24,12 +25,24 @@ const Schema = React.createClass({
24
25
this . StatusAction = app . appRegistry . getAction ( 'Status.Actions' ) ;
25
26
this . StatusRow = app . appRegistry . getComponent ( 'App.StatusRow' ) ;
26
27
this . queryBar = app . appRegistry . getComponent ( 'Query.QueryBar' ) ;
28
+ this . CollectionStore = app . appRegistry . getStore ( 'App.CollectionStore' ) ;
27
29
} ,
28
30
29
31
shouldComponentUpdate ( ) {
30
32
return true ;
31
33
} ,
32
34
35
+ componentDidUpdate ( ) {
36
+ // when the namespace changes and the schema tab is not active, the
37
+ // tab is "display:none" and its width 0. That also means the the minichart
38
+ // auto-sizes to 0. Therefore, when the user switches back to the tab,
39
+ // making it "display:block" again and giving it a proper non-zero size,
40
+ // the minicharts have to be re-rendered.
41
+ if ( this . CollectionStore . getActiveTab ( ) === 0 ) {
42
+ SchemaActions . resizeMiniCharts ( ) ;
43
+ }
44
+ } ,
45
+
33
46
/**
34
47
* updates the progress bar according to progress of schema sampling.
35
48
* The count is indeterminate (trickling), and sampling/analyzing is
You can’t perform that action at this time.
0 commit comments