Просмотр исходного кода

Fix Firefox and Safari scroll issue in VMs list CORWEB-39

Use the same animation as next page when reloadinc VMs.
Sergiu Miclea 8 лет назад
Родитель
Сommit
6560b91295

+ 6 - 1
src/components/WizardVms/WizardVms.js

@@ -217,6 +217,11 @@ class WizardVms extends Component {
     )
   }
 
+  refreshButtonClick() {
+    this.props.setWizardState({ loadingState: loadingStates.PAGINATION })
+    this.setState({ page: 0 }, this.reloadInstances)
+  }
+
   renderFilteredItems() {
     if (this.state.filteredData && this.state.filteredData.length) {
       let instances = this.state.filteredData.map((item, index) =>
@@ -277,7 +282,7 @@ class WizardVms extends Component {
             {this.instancesSelected()} instances selected
                 </div>
           <div className={s.refreshButton}
-            onClick={this.reloadInstances}
+            onClick={this.refreshButtonClick.bind(this)}
           >
             <div className="refresh icon"></div>
           </div>

+ 1 - 2
src/components/WizardVms/WizardVms.scss

@@ -61,9 +61,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
     .refreshButton {
       cursor: pointer;
-      padding: 8px 8px 0 7px;
+      padding: 8px 0 0 7px;
       margin-top: 4px;
-      margin-right: -8px;
       height: 19px;
     }
 

+ 1 - 1
src/components/variables.scss

@@ -42,7 +42,7 @@ $header-text-color: $blue;
 
 $max-content-width:     100%;
 $narrow-content-width: 928px;
-$wizard-content-width: 768px;
+$wizard-content-width: 770px;
 
 $border-radius: 4px;