jeffkolez
jeffkolez

Reputation: 648

ext-js update params dynamically

I'm building a search using ext-js. I have an event that fires on keyup. I want to be able to change either the URL I'm searching, or the params. I've had luck with neither.

Here's my snippit of code:

Ext.get("search").on('keyup', function() {
proxy.url = '/customer/list?key=' + $('search').value;
store.load();
});

But, no love for me. The store loads, but the proxy.url is the old value. Is what I'm trying to do possible?

Thanks in advance!

Upvotes: 1

Views: 1128

Answers (1)

Brian Moeskau
Brian Moeskau

Reputation: 20419

You'd probably want to use the proxy.setUrl() method instead which internally updates the connection. If changing the params is sufficient, you could also try passing the params config into the load call, e.g., store.load({params: {...}});

Upvotes: 3

Related Questions