stable
Clone or download
No functional change expected. How to test: - In TLP doc, go to the list-picker page. Open your dev tools, find a <select> element with a list picker attached. - Change the text content of one of the <option> elements. Nothing happens. - Change the value of the same <option>. List-picker should refresh and change the contents of its dropdown with the up-to-date label and value for the option. Notes: This change is made in order to handle <option> elements rendered by hybrids. Hybrids tries to minimize the changes it applies to the DOM, so it only updates the text content and attributes of options when they change. Since the actual <option> node does not change, list-picker became disconnected and allowed selecting options that were no longer present. It is surprising that we did not run into this problem earlier, Vue is supposed to have a virtual DOM and also minimize changes, but apparently it recreates new <option> elements. part of request #22648 Convert AngularJS directives and controllers to hybrids web components Change-Id: I8f31c9f0c18cff7b5ff9583ca8df10f29da113a8
Modified Files
Name | ||||
---|---|---|---|---|
M | lib/frontend/list-picker/src/events/ListOptionsChangesObserver.test.ts | +23 | −10 | Go to diff View file |
M | lib/frontend/list-picker/src/events/ListOptionsChangesObserver.ts | +5 | −7 | Go to diff View file |
M | lib/frontend/list-picker/src/helpers/templates/list-picker-element-badge-creator.test.ts | +8 | −6 | Go to diff View file |
M | lib/frontend/list-picker/src/items/ItemsMapManager.test.ts | +2 | −1 | Go to diff View file |
M | lib/frontend/list-picker/src/items/ListItemMapBuilder.test.ts | +5 | −4 | Go to diff View file |
M | lib/frontend/list-picker/src/navigation/KeyboardNavigationManager.test.ts | +3 | −2 | Go to diff View file |
M | lib/frontend/list-picker/src/renderers/DropdownContentRenderer.test.ts | +11 | −9 | Go to diff View file |
M | lib/frontend/list-picker/src/selection/MultipleSelectionManager.test.ts | +3 | −2 | Go to diff View file |
M | lib/frontend/list-picker/src/selection/SingleSelectionManager.test.ts | +14 | −16 | Go to diff View file |
M | lib/frontend/list-picker/src/test-helpers/select-box-options-generator.ts | +43 | −61 | Go to diff View file |