0
votes

I have created a simple combo box with a few values in it. I am having data brought back to populate the combo box. The combo box is disabled, but when they click an 'edit' button, the combo box becomes editable and the user can select the option that they want.

However, when they click edit, the combo box is already populated with one of the values and when they click the drop down button they can only see that value that is already entered. Is there a way that I can add a listener or something so when they click on the drop down all of the values show?

Here is my combo box field code:

{
                        xtype:'combo',
                        store: ['Open','Closed', 'N/A'],
                        fieldLabel: 'Status',
                        id: 'status',
                        readOnly: true,
                        disabled: true,
                        width: 105
                    }
1
Your explanation is confusing, so you don't want there to be any values in the drop-down when the user is not in 'edit' mode?Seano666
Right, the user comes to the page and the combo box is already populated with a value and it is disabled and readOnly so it essentially looks like a textfield. Then, when they click edit, it just turns to the combobox with the drop down and when they click the drop down I want the value that is entered to go away so it shows all of the options in the drop down.user1676428

1 Answers

1
votes

You don't need to clear the current value for all values to show, just set triggerAction: 'all' in the combo config.