stable

Clone or download

Read-only

Be able to select/unselect single values

part of: story #16645 have searchable (multi) select boxes with (static binding, no dependencies) Sorry for this big patch, I had to refactor the code in order to avoid passing a sh*tload of parameters to each function. Moreover, I know that list-picker.ts is a bit messy. I will take care of it when I will remove the usage of mustache.js, which I must admit, creates more problems than it solves. How to test: - When a <select> element has a selected value --> The corresponding item is already selected in the list picker - Select a value, then another one --> The value is updated in the list picker field --> In the dropdown, the item is highlighted --> The corresponding source select <option> has the selected "attribute" - Click on the cross next to the value --> The placeholder is now displayed --> The item in the dropdown does not appear selected --> The corresponding option has not the "selected" attribute --> The dropdown opens Change-Id: I011f43ad45f2f77a4a7b4066e4bcf7e689148220

Modified Files

Name
R src/scripts/list-picker/src/helpers/dropdown-content-renderer.test.ts Go to diff View file
A src/scripts/list-picker/src/helpers/DropdownContentRenderer.ts +117 −0 Go to diff View file
R src/scripts/list-picker/src/helpers/dropdown-helper.test.ts Go to diff View file
A src/scripts/list-picker/src/helpers/DropdownToggler.ts +47 −0 Go to diff View file
R src/scripts/list-picker/src/helpers/list-picker-events-helper.test.ts Go to diff View file
A src/scripts/list-picker/src/helpers/EventManager.ts +100 −0 Go to diff View file
A src/scripts/list-picker/src/helpers/SelectionManager.test.ts +198 −0 Go to diff View file
A src/scripts/list-picker/src/helpers/SelectionManager.ts +145 −0 Go to diff View file
R src/scripts/list-picker/src/helpers/__snapshots__/dropdown-content-renderer.test.ts.snap Go to diff View file
D src/scripts/list-picker/src/helpers/dropdown-content-renderer.ts +0 −114 Go to diff View file
D src/scripts/list-picker/src/helpers/dropdown-helper.ts +0 −40 Go to diff View file
D src/scripts/list-picker/src/helpers/list-picker-events-helper.ts +0 −59 Go to diff View file
M src/scripts/list-picker/src/helpers/static-list-helper.ts +1 −1 Go to diff View file
M src/scripts/list-picker/src/list-picker.test.ts +1 −1 Go to diff View file
M src/scripts/list-picker/src/list-picker.ts +57 −17 Go to diff View file
M src/scripts/list-picker/themes/BurningParrot/style.scss +17 −0 Go to diff View file
M src/themes/tlp/src/scss/components/_forms.scss +27 −5 Go to diff View file
M src/www/tlp-doc/resources/forms/list-picker/example.html +1 −1 Go to diff View file