@lvce-editor/quick-pick-worker 4.10.0 → 4.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3304,6 +3304,10 @@ const isQuickInput = args => {
|
|
|
3304
3304
|
const options = args.at(-1);
|
|
3305
3305
|
return options?.mode === 'quickInput';
|
|
3306
3306
|
};
|
|
3307
|
+
const isStaticQuickInput = args => {
|
|
3308
|
+
const options = args.at(-1);
|
|
3309
|
+
return options?.mode === 'quickInput' && options.quickInputId === undefined;
|
|
3310
|
+
};
|
|
3307
3311
|
|
|
3308
3312
|
// TODO when user types letters -> no need to query provider again -> just filter existing results
|
|
3309
3313
|
const setValue = async (state, newValue) => {
|
|
@@ -3324,11 +3328,12 @@ const setValue = async (state, newValue) => {
|
|
|
3324
3328
|
}
|
|
3325
3329
|
const prefix = getQuickPickPrefix(newValue);
|
|
3326
3330
|
const subId = getQuickPickSubProviderId(providerId, prefix);
|
|
3327
|
-
const
|
|
3331
|
+
const quickInput = isQuickInput(args);
|
|
3332
|
+
const newPicks = isStaticQuickInput(args) || subId === LanguageMode$1 ? state.picks : await getPicks(subId, newValue, args, {
|
|
3328
3333
|
assetDir,
|
|
3329
3334
|
platform
|
|
3330
3335
|
});
|
|
3331
|
-
const filterValue =
|
|
3336
|
+
const filterValue = quickInput ? '' : getFilterValue(providerId, subId, newValue);
|
|
3332
3337
|
const items = filterQuickPickItems(newPicks, filterValue);
|
|
3333
3338
|
const focusedIndex = items.length === 0 ? -1 : 0;
|
|
3334
3339
|
const sliced = items.slice(minLineY, maxLineY);
|
|
@@ -4588,6 +4593,7 @@ const showQuickInput = async ({
|
|
|
4588
4593
|
ignoreFocusOut,
|
|
4589
4594
|
initialItems = [],
|
|
4590
4595
|
initialValue,
|
|
4596
|
+
placeholder,
|
|
4591
4597
|
waitUntil
|
|
4592
4598
|
}) => {
|
|
4593
4599
|
const customItemsId = add(initialItems);
|
|
@@ -4598,6 +4604,7 @@ const showQuickInput = async ({
|
|
|
4598
4604
|
ignoreFocusOut,
|
|
4599
4605
|
initialValue,
|
|
4600
4606
|
mode: 'quickInput',
|
|
4607
|
+
placeholder,
|
|
4601
4608
|
quickInputId: id,
|
|
4602
4609
|
waitUntil
|
|
4603
4610
|
});
|