1. #1
    Sencha User mashiki's Avatar
    Join Date
    Oct 2007
    Location
    Japan
    Posts
    139
    Vote Rating
    0
    mashiki is on a distinguished road

      0  

    Question My Combobox doesn't work well.

    First, three choices "red", "brue" and "green" are displayed correctly.
    But once something was selected, only one choices are displayed.

    I expect three choices to be allways displayed.

    Code:
    Ext.onReady(function(){
    	var combo = new Ext.form.ComboBox({
    			store: new Ext.data.SimpleStore({
    			fields: ['code', 'value'],
    			data : [
    				['01', 'red'],
    				['02', 'green'],
    				['03', 'blue']
    			]
    		}),
    		applyTo: 'combo-area',
    		valueField:'code',
    		displayField:'value',
    		editable: false,
    		mode: 'local'
    	})
    });
    Thanks.

  2. #2
    Sencha User catacaustic's Avatar
    Join Date
    Jul 2007
    Location
    "A Land Down Under"
    Posts
    618
    Vote Rating
    1
    catacaustic is on a distinguished road

      0  

    Default

    You need to add:
    Code:
    triggerAction: 'all'
    As a config option, and that should solve your issues.

    It's all to do with the behind-the-scenes filtering. When you select 'red' the ComboBox filters the store for 'red', so the other options are filtered out of the list.
    'Once again, fortune vomits on my eiderdown'
    - Edmund Blackadder

  3. #3
    Ext User Hunterman's Avatar
    Join Date
    Jan 2008
    Posts
    23
    Vote Rating
    0
    Hunterman is on a distinguished road

      0  

    Default

    PHP Code:
    ..........
    applyTo'combo-area',
    valueField:'code',
    hiddenName 'value'//<------- add 
    displayField:'value',
    editablefalse,
    mode'local'
    ......... 
    http://extjs.com/forum/showthread.php?t=23038 <---- look here

    http://extjs.com/deploy/dev/docs/out....ComboBox.html

  4. #4
    Sencha User catacaustic's Avatar
    Join Date
    Jul 2007
    Location
    "A Land Down Under"
    Posts
    618
    Vote Rating
    1
    catacaustic is on a distinguished road

      0  

    Default

    Quote Originally Posted by Hunterman View Post
    Code:
    hiddenName : 'value', //<------- add
    Thats a good idea too if you need it, but it doesn't help with the OP's problem. What you've posted there is a whole separate issue.
    'Once again, fortune vomits on my eiderdown'
    - Edmund Blackadder

  5. #5
    Sencha User mashiki's Avatar
    Join Date
    Oct 2007
    Location
    Japan
    Posts
    139
    Vote Rating
    0
    mashiki is on a distinguished road

      0  

    Default

    triggerAction: 'all'
    Thank you for adequate advice.
    The cause of the problem was it.

Thread Participants: 2