Opened 13 years ago

Last modified 5 years ago

#5487 closed enhancement

ComboBox: using a value that isn't the display label is too hard — at Version 5

Reported by: alex Owned by: alex
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 (5)

comment:1 Changed 13 years ago by kurund

Cc: kurund added

comment:2 Changed 13 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 13 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 13 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">
            return true;
        // otherwise check the value against the server (via ajax?) here
    <option value="AL">Alabama</option>
    <option value="AK">Alaska</option>

comment:5 Changed 13 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.

Note: See TracTickets for help on using tickets.