Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/internal-packages/schema/lib/component/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const app = require('hadron-app');
const React = require('react');
const SchemaActions = require('../action');
const SchemaStore = require('../store');
const StateMixin = require('reflux-state-mixin');
const Field = require('./field');
Expand All @@ -24,12 +25,24 @@ const Schema = React.createClass({
this.StatusAction = app.appRegistry.getAction('Status.Actions');
this.StatusRow = app.appRegistry.getComponent('App.StatusRow');
this.queryBar = app.appRegistry.getComponent('Query.QueryBar');
this.CollectionStore = app.appRegistry.getStore('App.CollectionStore');
},

shouldComponentUpdate() {
return true;
},

componentDidUpdate() {
// when the namespace changes and the schema tab is not active, the
// tab is "display:none" and its width 0. That also means the the minichart
// auto-sizes to 0. Therefore, when the user switches back to the tab,
// making it "display:block" again and giving it a proper non-zero size,
// the minicharts have to be re-rendered.
if (this.CollectionStore.getActiveTab() === 0) {
SchemaActions.resizeMiniCharts();
}
},

/**
* updates the progress bar according to progress of schema sampling.
* The count is indeterminate (trickling), and sampling/analyzing is
Expand Down