Opened 12 years ago

Closed 4 years ago

#5487 closed enhancement (patchwelcome)

ComboBox: using a value that isn't the display label is too hard

Reported by: alex Owned by:
Priority: high Milestone: 1.13
Component: Dijit - Form Version: 0.9
Keywords: Cc: kurund
Blocked By: Blocking:

Description (last modified by bill)

there are some issues with the behavior of the ComboBox WRT it's similarity to the <select> tag. It's not clear today how to set the value such that it's different from the option label.

Change History (12)

comment:1 Changed 12 years ago by kurund

Cc: kurund added

comment:2 Changed 12 years ago by alex

to clarify, there are cases when the behavior of FilteringSelect? (minus insistence on an existing value) is preferable to that of ComboBox?, which has no valueNode. It may be the case that you want to spot users the ability to select from one of the available options, and if what they are entering isn't in that list, check with the server manually.

It's probably possible to do this with a hack on FilteringSelect? today, but ISTM that it's more in-line with the UI design goal of ComboBox?.

comment:3 Changed 12 years ago by alex

(In [11933]) trying to bring FilteringSelect? and ComboBox? up to the style guide and make them readable. Refs #5487

comment:4 Changed 12 years ago by alex

so it looks like the workaround is to do something to change the way FIlteringSelect handles valid and invalid items. For instance:

<select dojoType="dijit.form.FilteringSelect" name="state" id="state">
    <script type="dojo/method" event="isValid">
        if(this._isvalid){
            return true;
        }
        // otherwise check the value against the server (via ajax?) here
    </script>
    <option value="AL">Alabama</option>
    <option value="AK">Alaska</option>
    ...
</select>

comment:5 Changed 11 years ago by bill

Component: GeneralDijit
Description: modified (diff)
Milestone: 1.11.2
Summary: using a value in a ComboBox that isn't the display label is too hardComboBox: using a value that isn't the display label is too hard

Move all milestone 1.1 tickets to 1.2, except for reopened tickets and tickets opened after 1.1RC1 was released.

I'm not sure what this ticket is about, exactly (the title & description seem unrelated to the comments) but if you have a patch, run it by me and maybe we can add it to the code base. I need to review it first though, before adding any functionality to ComboBox.

comment:6 Changed 11 years ago by Dustin Machi

Type: defectenhancement

comment:7 Changed 11 years ago by bill

Milestone: 1.2future

comment:8 Changed 8 years ago by Chris Mitchell

Owner: changed from alex to Douglas Hays

please review and triage accordingly

comment:9 Changed 8 years ago by bill

Component: DijitDijit - Form

comment:10 Changed 6 years ago by Douglas Hays

Owner: Douglas Hays deleted
Status: newassigned

comment:11 Changed 6 years ago by Douglas Hays

Status: assignedopen

comment:12 Changed 4 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: openclosed

Given that no one has shown interest in creating a patch in the past 8 years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.