UI Dropdown - How to select / deselect all?

Hi,

Thank you very much for your quick reply! Your answer is good. I've tried something like this before I wrote the post but it was stuck in a continuous loop as I thought I had to send "msg.options" (I didn't know about the "msg.payload" trick)

Anyway, I've discovered something strange. If you have over 7 options, a similar button appears which does what I want (select, deselect and search). Can somebody tell me how can I edit this limit?

Thanks in advance!