Results 1 to 3 of 3

Thread: ComboBox editor with selection in grid doesn't show other items

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    8
    Vote Rating
    1
      1  

    Default ComboBox editor with selection in grid doesn't show other items

    Setup. Note that an existing "mapping" is added to the store, and four options are added to the combo. When I click the combo on the record with the existing "mapping" only that one value ("likely republican") is shown.

    Code:
            if (existingMappings != null) {
                for (Map.Entry<String, String> responseMapping : existingMappings.entrySet()) {
                    final Record value = new Record();
                    value.setKey(responseMapping.getKey()); // 
                    value.setValue(responseMapping.getValue()); // likely republican 
                    store.add(value);
                }
            }
    
            final List<ColumnConfig<Record, ?>> cols1 = new LinkedList<ColumnConfig<Record, ?>>();
            final ColumnConfig<Record, String> config1 = new ColumnConfig<Record, String>(props.key());
            config1.setHeader(incomingHeader);
            config1.setResizable(true);
            final ColumnConfig<Record, String> config2 = new ColumnConfig<Record, String>(props.value());
            config2.setHeader(outputHeader);
            cols1.add(config1);
            cols1.add(config2);
    
    
            final ColumnModel<Record> model1 = new ColumnModel<Record>(cols1);
    
    
            final Grid<Record> grid1 = new Grid<Record>(store, model1);
            grid1.setBorders(true);
            grid1.getView().setAutoExpandColumn(config1);
            grid1.getView().setStripeRows(true);
            grid1.getView().setTrackMouseOver(true);
            grid1.getView().setForceFit(true);
    
    
            final SimpleComboBox<String> opts = new SimpleComboBox<String>(new StringLabelProvider<String>());
            for (String opt : options) {
                opts.add(opt); // four options here
            }
            opts.setAllowTextSelection(false);
            opts.setForceSelection(true);
    Note here that only the one value is visible:

    sencha-bug2.png


    However, note here (my debugger is in ComboBoxCell) that the combo's store has all 4 items. I think the bug is that the "all" collection (further down in the variables pane) has only 1 of the items.

    sencha-bug.jpg

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    131
      1  

    Default

    Just a guess, have you tried to set the triggeraction to TriggerAction.ALL for the ComboBox?

  3. #3
    Sencha User
    Join Date
    Feb 2013
    Posts
    8
    Vote Rating
    1
      0  

    Default

    Ah indeed this was the problem -- thanks.

    Am I missing documentation that describes this? I see now that the Javadoc alludes to it, but it was easy to miss.

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
  •