@lvce-editor/quick-pick-worker 2.0.0 → 2.2.0

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.
@@ -2037,8 +2037,7 @@ const handleBeforeInput = (state, inputType, data, selectionStart, selectionEnd)
2037
2037
  };
2038
2038
 
2039
2039
  const handleBlur = async state => {
2040
- // TODO fix virtual dom diffing so that input isn't destroyed and loses focus when rerendering
2041
- // await CloseWidget.closeWidget(state.uid)
2040
+ await closeWidget(state.uid);
2042
2041
  return state;
2043
2042
  };
2044
2043
 
@@ -3863,6 +3862,9 @@ const getQuickPickVirtualDom = (visibleItems, scrollBarHeight, scrollBarTop) =>
3863
3862
  };
3864
3863
 
3865
3864
  const renderItemsDom = state => {
3865
+ if (state.initial) {
3866
+ return [];
3867
+ }
3866
3868
  const viewModel = createQuickPickViewModel(state, state);
3867
3869
  const {
3868
3870
  scrollBarHeight,
@@ -3879,9 +3881,6 @@ const renderItems = (_oldState, newState) => {
3879
3881
  const renderIncremental = (oldState, newState) => {
3880
3882
  const oldDom = renderItemsDom(oldState);
3881
3883
  const newDom = renderItemsDom(newState);
3882
- if (oldState.initial) {
3883
- return [SetDom2, newDom];
3884
- }
3885
3884
  const patches = diffTree(oldDom, newDom);
3886
3885
  return [SetPatches, newState.uid, patches];
3887
3886
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/quick-pick-worker",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/quick-pick-worker.git"