Results 1 to 4 of 4

Thread: setValue on combobox uses displayField if valueField is 0 in IE

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Feb 2014
    Posts
    8

    Default setValue on combobox uses displayField if valueField is 0 in IE

    This is a very specific/weird one...

    Only happens in IE (I have IE 11 running in edge mode).

    After the combo's store is loaded, I am calling the setValue method on the combo, passing in a 0, which is properly mapped as a valueField for the combo. However after the setValue runs, and I call getValue, I am getting the disaplyValue (instead of 0).

    This behavior is the same as if you try to set a value that does not exist in the store. I suspect that in IE the 0 is being treated as empty during the setValue method.

    Please let me know if this was not clear.

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report. Can you please post a test case which reproduces this issue?
    https://fiddle.sencha.com/#home

  3. #3
    Sencha User
    Join Date
    Feb 2014
    Posts
    8

    Default

    I have a test case set up here: https://fiddle.sencha.com/#fiddle/noa

    The issue I'm seeing is slightly different however. I was getting back the save value (so I would have been seeing "All" in the alert box). There does still seem to be an issue here though, I think the alert box should be showing 0 after the set value button then the get value buttons are cllicked.

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Regarding the alert box, according the docs it is expecting a string rather than an integer:
    http://docs.sencha.com/extjs/5.1/5.1...x-method-alert

    https://fiddle.sencha.com/#fiddle/nrd
    Code:
            Ext.Msg.alert('Current Value', ""+val);

Similar Threads

  1. Replies: 1
    Last Post: 7 Mar 2013, 1:57 AM
  2. combobox setvalue() show valuefield but not displayfield.
    By phpwebde in forum Ext: Discussion
    Replies: 4
    Last Post: 30 Mar 2012, 10:29 PM
  3. The comboBox valueField and displayField
    By wguo in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 13 Feb 2011, 2:14 AM
  4. valueField, displayField in ComboBox
    By sicher in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 14 Apr 2009, 11:18 AM
  5. [2.2] ComboBox - valueField & displayField
    By sniffer in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 21 Sep 2008, 6:57 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •