Opened 8 years ago

Closed 8 years ago

#12746 closed defect (duplicate)

[patch] [cla] dijit.form._ComboBoxDataStore: fetch with no query.name returns only empty options

Reported by: Kenneth G. Franqueiro Owned by: Douglas Hays
Priority: low Milestone: 1.7
Component: Dijit - Form Version: 1.6.0
Keywords: combobox Cc:
Blocked By: Blocking:

Description

The way dijit.form._ComboBoxDataStore (now dijit.form.DataList in trunk) is written, if no query (or more specifically, no query.name) is specified in the fetch arguments, it defaults to matching only options with blank innerHTML.

Normally this isn't really an issue, at least in the way that the store is accessed by ComboBox itself. It may be noticeable if one were to query the store directly however.

Attachments (2)

testComboDS.html (1.3 KB) - added by Kenneth G. Franqueiro 8 years ago.
Test page showing issue. First two buttons have same (bogus) result; third button has desired result.
12746.diff (617 bytes) - added by Kenneth G. Franqueiro 8 years ago.
Proposed one-line change that will fix the issue and doesn't seem to cause regressions.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Kenneth G. Franqueiro

Attachment: testComboDS.html added

Test page showing issue. First two buttons have same (bogus) result; third button has desired result.

Changed 8 years ago by Kenneth G. Franqueiro

Attachment: 12746.diff added

Proposed one-line change that will fix the issue and doesn't seem to cause regressions.

comment:1 Changed 8 years ago by bill

Summary: dijit.form._ComboBoxDataStore: fetch with no query.name returns only empty options[patch] [cla] dijit.form._ComboBoxDataStore: fetch with no query.name returns only empty options

Or you can use the condition "name" in args.query, I always prefer that format to check if an attribute is in a hash since it seems more intuitive and is a bit shorter and faster.

comment:2 Changed 8 years ago by Douglas Hays

Milestone: tbd1.7
Resolution: duplicate
Status: newclosed

Seems to have been fixed by the change to DataList? to inherit from dojo.store.Memory in [24654].

Note: See TracTickets for help on using tickets.