View Full Version : updating select after calling setOptions method

14 Feb 2011, 9:04 AM
i'm having this issue, when i update selects content with setOptions method, it doesn't update its width or height, i mean the drop down layout stays the same. i tried calling dolayout and so on, but it didn't work. is there a method in sencha i can call to force drop down select to fit it's contents?

25 Apr 2011, 7:38 PM
hi , i hava this problem too. How did you solve this problem. please tell me , thanks~~~
here is my email: lanfen100@163.com

25 Apr 2011, 11:10 PM
hi, I created a wrapper for the setOptions function

setOptions: function (options) {
var opt = options || [];

this.select.listPanel = new Ext.Panel({
floating: true,
stopMaskTapEvent: false,
hideOnMaskTap: true,
cls: 'x-select-overlay',
scroll: 'vertical',
items: {
xtype: 'list',
store: this.select.store,
itemId: 'list',
scroll: false,
itemTpl: [
'{' + this.select.displayField + '}',
listeners: {
select: this.select.onListSelect,
scope: this.select

and i override the listPanel (this is actuall part of the dropdown that lists elements) and then call setOptions and doLayout. simple as it could be B)

26 Apr 2011, 12:28 AM
thank you for you help , you method is useful.