Closed JonSams closed 3 years ago
@JonSams Here are some notes on how I'd approach building this out. For sure these notes are incomplete/imperfect, but hopefully a good starting place. Reach out anytime with questions.
picklist-pane.model.ts
SelectListOption
: Add new number property, position
FilterableSelectList
: Add new boolean property, sortable
ValueListOption
: constructor should optionally accept a position parameterValueSetListOption
: constructor should optionally accept a position parameterpicklist.model.ts
PicklistSettings
- add new boolean property sortable
… could make left and right pane independently configurable if you wanted, or just one property only for the right panepicklist.component.ts
@Input
settings as one big object, and you'll see there are some helper @Input
's like showHeaderText
… follow that pattern if you'd like a simple boolean @Input
interface on the componentpicklist-filter-local.servce.ts
getSortFunc()
should check to see if the given FilterableSelectList
is sortable, return a sortFunc that will order by positionpicklist-state.service.ts
reset()
should pass the sortable
setting value into the sortable
property on this.valueList
and this.valueSetList
updateValueList()
& updateValueSetList()
- should pass in position parameter to the ValueListOption
or ValueSetListOption
constructor IF list is sortable.picklist-action.service.ts
picklist-pane.component.html
FilterableSelectList
is sortablepicklist-pane.component.ts
Capturing three other picklist related issues in this one and bumping it onto the priority list
closed in #1359
Hi I have a use case where I need a picklist that is more generic in nature that can perform simple tasks like selecting items and re-ordering them similar to this PrimeNG component. https://www.primefaces.org/primeng/#/picklist. Specifically I want to use this for our Leading Wisely product, but do do so I need at a minimum to have a toggle added that could disable auto-sorting on the target list, but ideally buttons could be added to the target list that would allow them to be sorted (like PrimeNG component). Also if a toggle could be added to disable displaying the search boxes that would be great, but not necessary.