No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Filter fails when exact match is entered in ListGrid when using setValueMap


    I noticed a bug when filtering by exact match. This specifically occurred when using setValueMap and I believe that is where the problem lies. Eventually we figured out a work around, but its rather awkward and I feel like this is still a bug that needs to be reported.

    I've attached a test case, should be able to see any time you try exactly filtering to a name in the database.

    Seen in Chrome.

    SmartClient Version: 'SNAPSHOT_v12.1d_2019-10-02/LGPL Development Only'
    Attached Files

    We're not sure if this code reflects what you're actually doing in your app, but the usage is rather odd.

    You define a clientOnly DataSource, and you set autoFetchData, but then instead of allowing the grid to fetch from the DataSource, you call setData() with the records from the DS. So the grid is given data but then also fetches the same data from the DataSource. Normally, you would do only one or the other.

    Second odd thing: you are deriving a valueMap from the data, and providing a valueMap means the end user is expected to pick from a list, but you have also configured regexp-based filtering. Which do you actually want: pick from a list or regexp filtering? If you want regexp filtering, you don't need a valueMap. If you want a valueMap, don't configure regexp-based filtering.