开发者

extjs combo queryParam issue

I have a combo in extjs which is looking for usernames based on what the user types. The server backend is matching for whatever comes via get in the format $_GET['username'].

My combo queryParam is called username. When I start typing, the username={whatIType} key => value is sent and a matched resultset comes back from the server however, if i click on next page of the combo pagination it skips that queryParam and sends the request without any parameters whatsoever so all my results are being sent by the server since there's no match.

Here's my combo code:

{
    xtype: 'combo',
    triggerAction: 'all',
    displayField: 'username',
    name: 'user_id',
    valueField: 'id',
    store: usersStore,
    typeAhead: true,
    minChars: 2,
    forceSelection: true,
    enableKeyEvents: true,
    pageSize: 10,
    allowBlank: false,
    anchor: '100%',
    queryParam: 'username'
}
开发者_JAVA百科

When I start typing 1st request via GET:

http://localhost/admin/users/?_dc=1310050289796&username=ma&start=0&limit=50&page=1

If I click on next page:

http://localhost/admin/users/?_dc=1310050740222&page=4&start=150&limit=50

Any idea why this reset?


Looks like this is a known bug that will be fixed for 4.0.4 release...

http://www.sencha.com/forum/showthread.php?137019-Remote-ComboBox-with-paging-loses-queryParam


add this property queryMode: 'remote' If explicitly set to a falsy value it will not be sent.

https://docs.sencha.com/extjs/6.5.3/classic/src/ComboBox.js.html#Ext.form.field.ComboBox-cfg-queryParam

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜