Quickadd API Multi Select

Summary

Put this in your capture for a multi select

Code

const suggester = this.quickAddApi.suggester;
let toSuggest = ["Up late", "Fast asleep", "Poor sleep", "Done"];
const responses = [];
let response;

while (response !== "Done") {
    response = await suggester(toSuggest, toSuggest);
    if (response !== "Done") {
        responses.push(response);
        toSuggest = toSuggest.map(s => s === response ? `โœ… ${s}` : s);
    }
}

return responses.join(", ");

Explanation

Result


up:: ๐Ÿงช Code Diary