PDA

View Full Version : Adding Search field on it's own



abierbaum
10 Nov 2010, 8:31 AM
Is it possible to add a Search field to a layout (for example on a panel at the top of a list) without having a form panel and FieldSet that wraps it? If it is, what event can I watch for to know when the user has made a change to the value in the search field that I should look at to update the filter on my list?

Basically, can I use the form field UI items as standalone widgets on a panel and get signals directly from them or does everything have to route through a form submission process?

abierbaum
10 Nov 2010, 8:51 AM
Just tracked this down by looking at the Search Field code.

The Search field can be used on its own outside of a form. (the styling doesn't end up looking quite correct, but I can fix that later)

There is also an event "changed" that comes from the Ext.Text object. This is called when the text in the search field changes. (note: I did not see this before because there seems to be a bug in the documentation. The documentation for Ext.Search does not show Ext.Text as a parent and does not show the events/methods/etc from Ext.Text even though they can be used).