Hey Guys
I’m using the ImagePicker (for it’s obvious reasons); However I only want 1 image selected at a time (maximumNumberOfSelection: 1) perfect!
However I want, if you already have 1 image selected and then ‘re-select’ a different image you want to use instead, that it will change the selection and remove the other.
I’m having some trouble creating this feature, I have tried things such as:
onSelectionChanged: if(selectedCount === 1){imagePicker.clearSelection()}
OR
property var selectionArray: []
onSelectionChanged: selectionArray.length === 1 ? selectionArray = [] && selectionArray.push(selection.toString()) : selectionArray.push(selection.toString())
Amongst other variations or toying with the ‘onSelectionChanged’ and ‘onSelectionCountChanged’ but cannot seem to get it to clear when a new image is tapped. Is there any suggestions on how to go about this?