PDA

View Full Version : Population combobox hide problem



webarts-pl
18 Nov 2010, 4:02 AM
Hi,

I have used an example from here:
http://dev.sencha.com/deploy/dev/examples/form/forum-search.html

My code works fine but I have a problem when I click populated item in pagination element.
In above example there's redirection to a given URL but in my code I have an Ajax content loader.
After click it loads some content but the pagination element doesn't hide.

I tried to use an id to combobox but it hides only textbox.

Does anyone knows how to obtain it?

plalx
18 Nov 2010, 4:23 AM
I can't test right now, but have you tried to only remove the completely the onSelect override?

webarts-pl
18 Nov 2010, 4:29 AM
I don't think it's neccessary. I wanted to bind to it .hide(); function but I can't get ID of pagination element. That's main problem.

plalx
18 Nov 2010, 5:41 AM
Well, I just tested, you only have to remove to onSelect override to do what you want... to default onSelect function is taking care of the rest.

webarts-pl
18 Nov 2010, 6:16 AM
Thanks scarsick. Do you know where in API (documentation) id onSelect function?

Solution found:
i tried to use .hide(); and it was problem, after using: .collapse(); it made it ;)

Btw is there in doc onSelect function info?

plalx
18 Nov 2010, 9:03 AM
No, onSelect is a private function to the Ext.form.ComboBox class so it is not documented. By default, when selecting an item, it will hide the item list, this is why you don't need to add any additionnal logic. In the example, the onSelect function is overriden to provide a custom functionality, that's why the item list wasn't getting collasped.