Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.rap.addons.dropdown/js/rwt/dropdown/DropDown.js6
-rw-r--r--tests/org.eclipse.rap.addons.dropdown.test/js/rwt/dropdown/DropDown_Test.js11
2 files changed, 14 insertions, 3 deletions
diff --git a/bundles/org.eclipse.rap.addons.dropdown/js/rwt/dropdown/DropDown.js b/bundles/org.eclipse.rap.addons.dropdown/js/rwt/dropdown/DropDown.js
index 30b1627..8b44d43 100644
--- a/bundles/org.eclipse.rap.addons.dropdown/js/rwt/dropdown/DropDown.js
+++ b/bundles/org.eclipse.rap.addons.dropdown/js/rwt/dropdown/DropDown.js
@@ -94,7 +94,7 @@
this.setSelectionIndex( -1 );
this._.items = rwt.util.Arrays.copy( items );
renderGridItems.call( this );
- if( this._.visibility ) {
+ if( this._.grid.isSeeable() ) {
renderLayout.call( this );
}
updateScrollBars.call( this );
@@ -114,7 +114,7 @@
*/
setVisibleItemCount : function( itemCount ) {
this._.visibleItemCount = itemCount;
- if( this._.visibility ) {
+ if( this._.grid.isSeeable() ) {
renderLayout.call( this );
}
updateScrollBars.call( this );
@@ -232,7 +232,7 @@
setColumns : function( columns ) {
this._.columns = columns;
this._.grid.setColumnCount( columns.length );
- if( this._.visibility ) {
+ if( this._.grid.isSeeable() ) {
renderLayout.call( this );
}
},
diff --git a/tests/org.eclipse.rap.addons.dropdown.test/js/rwt/dropdown/DropDown_Test.js b/tests/org.eclipse.rap.addons.dropdown.test/js/rwt/dropdown/DropDown_Test.js
index 3136d39..e813f7d 100644
--- a/tests/org.eclipse.rap.addons.dropdown.test/js/rwt/dropdown/DropDown_Test.js
+++ b/tests/org.eclipse.rap.addons.dropdown.test/js/rwt/dropdown/DropDown_Test.js
@@ -554,6 +554,17 @@ rwt.qx.Class.define( "rwt.dropdown.DropDown_Test", {
assertEquals( 400, popup.getInnerWidth() );
},
+ testSetColumns_setsPopUpWidthAfterParentAppear : function() {
+ widget.destroy();
+ dropdown.destroy();
+ this.createExample();
+ dropdown.show();
+ dropdown.setColumns( [ 100, 200, 100 ] );
+ TestUtil.flush();
+
+ assertEquals( 400, popup.getInnerWidth() );
+ },
+
testSetColumns_setsDoesNotSetPopUpWidthIfSmaller : function() {
dropdown.setColumns( [ 30 ] );
showDropDown();

Back to the top