danhumphrey / Ext.ux.form.SuperBoxSelect

SuperBoxSelect is an extension of the ComboBox component which displays selected items as labelled boxes within the form field
MIT License
6 stars 3 forks source link

Search anywhere in text #3

Closed ChrstnMgcn closed 4 weeks ago

ChrstnMgcn commented 1 month ago

Is it possible to allow searching anywhere within the available values rather just the beginning of them?

For instance, on the demo page at https://danhumphrey.github.io/Ext.ux.form.SuperBoxSelect/

Searching for "Virginia" only shows "Virginia", but I'd like for it to also show "West Virginia".

danhumphrey commented 1 month ago

I wrote this code about 15 years ago.....I didn't even know that ExtJS still existed.

I have forgotten more than I remember about this framework, so can't offer a solution except maybe you could add a listener to the beforequery event or override the doQuery method.

Sorry I can't help further.

ChrstnMgcn commented 1 month ago

I completely understand. I have tried to modify the doQuery method with no success. However, it seems like the following would be what I'm looking for, but I have no idea what I'd pass in.

/**
     * @cfg {String|Regex} queryFilterRe Used to filter input values before querying the server, specifically useful when allowAddNewData is true as the filtered portion of the query will be passed to the newItem callback.
     */
    queryFilterRe: '',

Any thoughts on that?

danhumphrey commented 1 month ago

queryFilterRe isn't going to help. Sorry, I think you'll need to override the functionality instead

ChrstnMgcn commented 1 month ago

Ok. I'll attempt overriding it again. I appreciate you getting back to me.