Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33398

ComboBox loses selectedItem when dataProvider dispatch reset event

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • mx: ComboBox
    • None

    Description

      During a reset Event, combobox does reset the selectedItem but doesn't respect the fact the current selectedItem might be included in the new source.

      What I propose is to change

      else if (ce.kind == CollectionEventKind.RESET)

      { collectionChanged = true; if (!selectedIndexChanged && !selectedItemChanged) selectedIndex = prompt ? -1 : 0; invalidateProperties(); }

      to
      else if (ce.kind == CollectionEventKind.RESET)

      { collectionChanged = true; if (!selectedIndexChanged && !selectedItemChanged && !collection.contains(selectedItem)) selectedIndex = prompt ? -1 : 0; invalidateProperties(); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            jfernandes João Pedro Martins Fernandes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified