You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Show a list of options to the user and return which option they picked (and whether they used a modifier key), optionally with ability to create a new item.
134
-
* V2: without the <TDefault> type parameter, using the new CommandBar.showOptions() options from v3.18
134
+
* This is a fork of chooseOptionWithModifiers(), without the <TDefault> type parameter, using the new CommandBar.showOptions() options from v3.18
135
+
* Note: requires at least v3.18
135
136
* @author@jgclark, @dwertheimer based on @nmn chooseOption
136
137
*
137
138
* @param {string} message - text to display to user
138
139
* @param {Array<TCommandBarOptionObject>} options - array of options to display
139
140
* @param {TCommandBarOptionObject} additionalCreateNewOption - optional option object to create a new item
140
141
* @returns {Promise<TCommandBarResultObject>} - the object that was chosen, plus an index of the chosen option and keyModifiers array. If the user created a new item, the index will be -1.
result=awaitchooseOptionWithModifiersV2(msg,decoratedFolderOptions)// note disabling the add new folder option as we need to handle it with access to folders array
390
+
result=awaitchooseDecoratedOptionWithModifiers(msg,decoratedFolderOptions)// note disabling the add new folder option as we need to handle it with access to folders array
@@ -418,18 +417,13 @@ export async function chooseFolder(
418
417
}else{
419
418
thrownewError(`Failed to create new folder "${folder}"`)
420
419
}
420
+
}
421
421
422
422
}else{
423
423
// not including add new folder option
424
-
result=awaitchooseOptionWithModifiersV2(msg, decoratedFolderOptions),//includeNewFolderOption ? addDecoratedNewFolderOption : undefined) // note now wanting to disable the add new folder option as we are handling it specifically here
0 commit comments