belzebu
belzebu

Reputation: 820

Dojo : FilteringSelect : problems with coming back to valid state

I've came across this issue today and I think I might need some help. We are using 1.6.1 version of Dojo, but this is cross version issue.

Steps to reproduce the following issue are pretty simple:

  1. click the dojo doc link for Filtering Select dijit.form.FilteringSelect
  2. On the documentation page, click the first FilteringSelect sample
  3. In the Codeglass window sample, click the filteringselect and add "x" to "California", thus bringing it to invalid state
  4. While focused, delete the "x" letter. and here comes the problem. Technically the value is correct, but the dijit is still like in error state (unless it loses focus). I'd like to get the dijit react and render correctly straightaway I delete the character causing the invalid state without losing focus.

Any ideas for the workaround?

Thank you.

Upvotes: 0

Views: 538

Answers (1)

belzebu
belzebu

Reputation: 820

ok. for eveyryone else interested the solution was 'quite' simple, just use the dijit.form.FilteringSelect._refreshState() .The underscore prefix is might not be someone's cup of tea but that was the only way to get it in correct state.

in our case it was a bit tricky as we are using the dojox.data.QueryReadStore wrapped in our own object and I needed the proper trigger which I've found in connecting to onComplete event of the inherited fetch() method.

Upvotes: 1

Related Questions