diff --git a/__tests__/__snapshots__/factory.test.tsx.snap b/__tests__/__snapshots__/factory.test.tsx.snap index dc9354cf6..8aa480979 100644 --- a/__tests__/__snapshots__/factory.test.tsx.snap +++ b/__tests__/__snapshots__/factory.test.tsx.snap @@ -77,7 +77,9 @@ exports[`factory:definitions 1`] = ` - 引用 + + 引用 + @@ -97,7 +99,9 @@ exports[`factory:definitions 1`] = ` - 表单 + + 表单 + @@ -110,6 +114,7 @@ exports[`factory:definitions 1`] = ` >
@@ -261,6 +285,7 @@ exports[`factory:definitions 1`] = ` data-tooltip="删除" > @@ -275,8 +300,9 @@ exports[`factory:definitions 1`] = ` data-tooltip="新增一条数据" type="button" > - 新增 @@ -288,9 +314,14 @@ exports[`factory:definitions 1`] = `
- + + +
@@ -362,7 +393,9 @@ exports[`factory:definitions override 1`] = ` - 引用 + + 引用 + @@ -382,7 +415,9 @@ exports[`factory:definitions override 1`] = ` - 表单 + + 表单 + @@ -395,6 +430,7 @@ exports[`factory:definitions override 1`] = ` >
diff --git a/__tests__/helper.tsx b/__tests__/helper.tsx index aecbe8dbc..b6d283f73 100644 --- a/__tests__/helper.tsx +++ b/__tests__/helper.tsx @@ -1,23 +1,23 @@ -import { RenderOptions } from "../src/factory"; +import {RenderOptions} from '../src/factory'; // jest.useFakeTimers 会修改 global 的 setTimeout 所以需要把原始的记录下来。 -const timerFn = setTimeout; -export function wait(duration:number, fn?:Function) { - return new Promise((resolve) => { - timerFn(() => { - fn && fn(); - resolve(); - }, duration); - }); +const timerFn = setTimeout; +export function wait(duration: number, fn?: Function) { + return new Promise(resolve => { + timerFn(() => { + fn && fn(); + resolve(); + }, duration); + }); } -export function makeEnv(env?:Partial):RenderOptions { - return { - session: 'test-case', - isCancel: () => false, - notify: (msg:string) => null, - jumpTo: (to:string) => console.info('Now should jump to ' + to), - alert: (msg) => console.info(`Alert: ${msg}`), - ...env - } -} \ No newline at end of file +export function makeEnv(env?: Partial): RenderOptions { + return { + session: 'test-case', + isCancel: () => false, + notify: (msg: string) => null, + jumpTo: (to: string) => console.info('Now should jump to ' + to), + alert: msg => console.info(`Alert: ${msg}`), + ...env + }; +} diff --git a/__tests__/renderers/Form/__snapshots__/array.test.tsx.snap b/__tests__/renderers/Form/__snapshots__/array.test.tsx.snap index ddc336e2c..d35481d69 100644 --- a/__tests__/renderers/Form/__snapshots__/array.test.tsx.snap +++ b/__tests__/renderers/Form/__snapshots__/array.test.tsx.snap @@ -15,7 +15,9 @@ exports[`Renderer:array 1`] = ` - The form + + The form + @@ -28,6 +30,7 @@ exports[`Renderer:array 1`] = ` >
@@ -28,6 +30,7 @@ exports[`Renderer:button 1`] = ` >
@@ -150,6 +158,7 @@ exports[`Renderer:button 2`] = ` >
@@ -28,6 +30,7 @@ exports[`Renderer:button-group 1`] = ` >
@@ -580,7 +622,9 @@ exports[`Renderer:Page initApi 1`] = ` - The variable value is 2 + + The variable value is 2 + @@ -617,7 +661,7 @@ exports[`Renderer:Page initApi error show Message 1`] = ` type="button" > @@ -652,7 +696,9 @@ exports[`Renderer:Page initApi reFetch when condition changes 1`] = ` - The variable value is 1 + + The variable value is 1 + @@ -677,7 +723,9 @@ exports[`Renderer:Page initApi reFetch when condition changes 2`] = ` - The variable value is 2 + + The variable value is 2 + @@ -720,7 +768,9 @@ exports[`Renderer:Page initApi reload by Dialog action 1`] = ` - The variable value is 1 + + The variable value is 1 + @@ -758,7 +808,9 @@ exports[`Renderer:Page initApi reload by Dialog action 2`] = ` - The variable value is 1 + + The variable value is 1 + @@ -796,7 +848,9 @@ exports[`Renderer:Page initApi reload by Dialog action 3`] = ` - The variable value is 2 + + The variable value is 2 + @@ -840,7 +894,9 @@ exports[`Renderer:Page initApi reload by Drawer action 1`] = ` - The variable value is 1 + + The variable value is 1 + @@ -878,7 +934,9 @@ exports[`Renderer:Page initApi reload by Drawer action 2`] = ` - The variable value is 1 + + The variable value is 1 + @@ -922,7 +980,9 @@ exports[`Renderer:Page initApi reload by Drawer action 3`] = ` - The variable value is 2 + + The variable value is 2 + @@ -958,7 +1018,9 @@ exports[`Renderer:Page initApi reload by Form submit 1`] = ` - 表单 + + 表单 + @@ -971,6 +1033,7 @@ exports[`Renderer:Page initApi reload by Form submit 1`] = ` >
- The variable value is 1 + + The variable value is 1 +
@@ -1094,7 +1159,9 @@ exports[`Renderer:Page initApi reload by Form submit 2`] = ` - 表单 + + 表单 + @@ -1107,6 +1174,7 @@ exports[`Renderer:Page initApi reload by Form submit 2`] = ` >
- The variable value is 2 + + The variable value is 2 +
@@ -1238,7 +1308,9 @@ exports[`Renderer:Page initApi reload by action 1`] = ` - The variable value is 1 + + The variable value is 1 + @@ -1282,7 +1354,9 @@ exports[`Renderer:Page initApi reload by action 2`] = ` - The variable value is 2 + + The variable value is 2 + @@ -1314,7 +1388,9 @@ exports[`Renderer:Page initApi show loading 1`] = ` - The variable value is + + The variable value is + @@ -1345,7 +1421,9 @@ exports[`Renderer:Page initApi show loading 2`] = ` - The variable value is 3 + + The variable value is 3 + @@ -1376,7 +1454,9 @@ exports[`Renderer:Page initApi silentPolling 1`] = ` - The variable value is + + The variable value is + @@ -1407,7 +1487,9 @@ exports[`Renderer:Page initApi silentPolling 2`] = ` - The variable value is 3 + + The variable value is 3 + @@ -1432,7 +1514,9 @@ exports[`Renderer:Page initApi silentPolling 3`] = ` - The variable value is 3 + + The variable value is 3 + @@ -1457,7 +1541,9 @@ exports[`Renderer:Page initApi silentPolling 4`] = ` - The variable value is 4 + + The variable value is 4 + @@ -1482,7 +1568,9 @@ exports[`Renderer:Page initData 1`] = ` - The variable value is 1 + + The variable value is 1 + @@ -1513,7 +1601,9 @@ exports[`Renderer:Page initFetchOn trigger initApi fetch when condition becomes - The variable value is 6 + + The variable value is 6 + @@ -1538,7 +1628,9 @@ exports[`Renderer:Page location query 1`] = ` - The variable value is 5 + + The variable value is 5 + @@ -1563,7 +1655,9 @@ exports[`Renderer:Page location query 2`] = ` - The variable value is 6 + + The variable value is 6 + diff --git a/__tests__/renderers/__snapshots__/QRCode.test.tsx.snap b/__tests__/renderers/__snapshots__/QRCode.test.tsx.snap index 50cab3162..ad5162459 100644 --- a/__tests__/renderers/__snapshots__/QRCode.test.tsx.snap +++ b/__tests__/renderers/__snapshots__/QRCode.test.tsx.snap @@ -17,11 +17,22 @@ exports[`Renderer:qr-code 1`] = `
- + > + + +
diff --git a/__tests__/renderers/__snapshots__/Tabs.test.tsx.snap b/__tests__/renderers/__snapshots__/Tabs.test.tsx.snap index 2b5a1f6b5..8ac6483d4 100644 --- a/__tests__/renderers/__snapshots__/Tabs.test.tsx.snap +++ b/__tests__/renderers/__snapshots__/Tabs.test.tsx.snap @@ -35,9 +35,11 @@ exports[`Renderer:tabs 1`] = ` -

- tab1 内容 -

+ +

+ tab1 内容 +

+
diff --git a/__tests__/renderers/__snapshots__/Wizard.test.tsx.snap b/__tests__/renderers/__snapshots__/Wizard.test.tsx.snap index 9a059afeb..964d92625 100644 --- a/__tests__/renderers/__snapshots__/Wizard.test.tsx.snap +++ b/__tests__/renderers/__snapshots__/Wizard.test.tsx.snap @@ -5,7 +5,7 @@ exports[`Renderer:Wizard 1`] = ` className="a-Alert a-Alert--danger" >

- TypeError: Cannot read property '_ownerDocument' of undefined + TypeError: The provided value is not of type 'Element'.

     
@@ -14,8 +14,9 @@ exports[`Renderer:Wizard 1`] = `
     in WithStore(WizardRenderer) (created by Scoped(WithStore(WizardRenderer)))
     in Scoped(WithStore(WizardRenderer)) (created by Renderer)
     in Renderer (created by RootRenderer)
-    in ImageGallery (created by Themeable(ImageGallery))
-    in Themeable(ImageGallery) (created by RootRenderer)
+    in ImageGallery (created by I18N(ImageGallery))
+    in I18N(ImageGallery) (created by Themeable(I18N(ImageGallery)))
+    in Themeable(I18N(ImageGallery)) (created by RootRenderer)
     in RootRenderer (created by Scoped(RootRenderer))
     in Scoped(RootRenderer)
     
@@ -26,49 +27,77 @@ exports[`Renderer:Wizard 1`] = `
 exports[`Renderer:Wizard actionPrevLabel actionNextLabel actionFinishLabel className actionClassName 1`] = `
 
-
    -
  • - - 1 - - Step 1 -
  • -
  • - - 2 - - Step 2 -
  • -
-
-
-
- +
  • + + 1 + + Step 1 +
  • +
  • + + 2 + + Step 2 +
  • + +
    +
    + - 这是最后一步了 - - + + + 这是最后一步了 + + + +
    +
    -
    `; @@ -136,98 +145,127 @@ exports[`Renderer:Wizard actionPrevLabel actionNextLabel actionFinishLabel class exports[`Renderer:Wizard actionPrevLabel actionNextLabel actionFinishLabel className actionClassName 2`] = `
    -
      -
    • - - 1 - - Step 1 -
    • -
    • - - 2 - - Step 2 -
    • -
    -
    -
    -
    -
    -
    +
    + +
    + +
    +
    + +
    -
    -
    -
    -
    - + + 名称 + + +
    +
    + +
    -
    - + +
    +
    -
    `; @@ -308,110 +325,140 @@ exports[`Renderer:Wizard dialog 1`] = ` class="a-Page-body" >
    -
      -
    • - - 1 - - Step 1 -
    • -
    • - - 2 - - Step 2 -
    • -
    -
    -
    -
    -
    -
    +
    + +
    + +
    +
    + +
    -
    -
    -
    -
    - + + 名称 + + +
    +
    + +
    -
    -
    - -
    - + +
    + +
    +
    - @@ -496,110 +522,140 @@ exports[`Renderer:Wizard dialog 2`] = ` class="a-Page-body" >
    -
      -
    • - - 1 - - Step 1 -
    • -
    • - - 2 - - Step 2 -
    • -
    -
    -
    -
    -
    -
    +
    + +
    + +
    +
    + +
    -
    -
    -
    -
    - + + 名称 + + +
    +
    + +
    -
    -
    - -
    - + +
    + +
    +
    - @@ -674,7 +709,7 @@ exports[`Renderer:Wizard initApi 1`] = ` className="a-Alert a-Alert--danger" >

    - TypeError: Cannot read property '_ownerDocument' of undefined + TypeError: The provided value is not of type 'Element'.

         
    @@ -683,8 +718,9 @@ exports[`Renderer:Wizard initApi 1`] = `
         in WithStore(WizardRenderer) (created by Scoped(WithStore(WizardRenderer)))
         in Scoped(WithStore(WizardRenderer)) (created by Renderer)
         in Renderer (created by RootRenderer)
    -    in ImageGallery (created by Themeable(ImageGallery))
    -    in Themeable(ImageGallery) (created by RootRenderer)
    +    in ImageGallery (created by I18N(ImageGallery))
    +    in I18N(ImageGallery) (created by Themeable(I18N(ImageGallery)))
    +    in Themeable(I18N(ImageGallery)) (created by RootRenderer)
         in RootRenderer (created by Scoped(RootRenderer))
         in Scoped(RootRenderer)
         
    @@ -707,98 +743,127 @@ exports[`Renderer:Wizard initApi reload 1`] = `
               class="a-Page-body"
             >
               
    -
      -
    • - - 1 - - Step 1 -
    • -
    • - - 2 - - Step 2 -
    • -
    -
    -
    -
    -
    -
    +
    + +
    + +
    +
    + +
    -
    -
    -
    -
    - + + 名称 + + +
    +
    + +
    -
    - + +
    +
    -
    @@ -883,49 +927,77 @@ exports[`Renderer:Wizard initApi reload 2`] = ` class="a-Page-body" >
    -
      -
    • - - 1 - - Step 1 -
    • -
    • - - 2 - - Step 2 -
    • -
    -
    -
    -
    - +
  • + + 1 + + Step 1 +
  • +
  • + + 2 + + Step 2 +
  • + +
    +
    + - 这是最后一步了 - - + + + 这是最后一步了 + + + +
    +
    - @@ -1009,49 +1061,77 @@ exports[`Renderer:Wizard initApi reload 3`] = ` class="a-Page-body" >
    -
      -
    • - - 1 - - Step 1 -
    • -
    • - - 2 - - Step 2 -
    • -
    -
    -
    -
    - +
  • + + 1 + + Step 1 +
  • +
  • + + 2 + + Step 2 +
  • + +
    +
    + - 这是最后一步了 - - + + + 这是最后一步了 + + + +
    +
    - @@ -1125,7 +1185,7 @@ exports[`Renderer:Wizard initApi show loading 1`] = ` className="a-Alert a-Alert--danger" >

    - TypeError: Cannot read property '_ownerDocument' of undefined + TypeError: The provided value is not of type 'Element'.

         
    @@ -1134,8 +1194,9 @@ exports[`Renderer:Wizard initApi show loading 1`] = `
         in WithStore(WizardRenderer) (created by Scoped(WithStore(WizardRenderer)))
         in Scoped(WithStore(WizardRenderer)) (created by Renderer)
         in Renderer (created by RootRenderer)
    -    in ImageGallery (created by Themeable(ImageGallery))
    -    in Themeable(ImageGallery) (created by RootRenderer)
    +    in ImageGallery (created by I18N(ImageGallery))
    +    in I18N(ImageGallery) (created by Themeable(I18N(ImageGallery)))
    +    in Themeable(I18N(ImageGallery)) (created by RootRenderer)
         in RootRenderer (created by Scoped(RootRenderer))
         in Scoped(RootRenderer)
         
    @@ -1148,7 +1209,7 @@ exports[`Renderer:Wizard initApi show loading 2`] = `
       className="a-Alert a-Alert--danger"
     >
       

    - TypeError: Cannot read property '_ownerDocument' of undefined + TypeError: The provided value is not of type 'Element'.

         
    @@ -1157,8 +1218,9 @@ exports[`Renderer:Wizard initApi show loading 2`] = `
         in WithStore(WizardRenderer) (created by Scoped(WithStore(WizardRenderer)))
         in Scoped(WithStore(WizardRenderer)) (created by Renderer)
         in Renderer (created by RootRenderer)
    -    in ImageGallery (created by Themeable(ImageGallery))
    -    in Themeable(ImageGallery) (created by RootRenderer)
    +    in ImageGallery (created by I18N(ImageGallery))
    +    in I18N(ImageGallery) (created by Themeable(I18N(ImageGallery)))
    +    in Themeable(I18N(ImageGallery)) (created by RootRenderer)
         in RootRenderer (created by Scoped(RootRenderer))
         in Scoped(RootRenderer)
         
    @@ -1171,7 +1233,7 @@ exports[`Renderer:Wizard readOnly 1`] = `
       className="a-Alert a-Alert--danger"
     >
       

    - TypeError: Cannot read property '_ownerDocument' of undefined + TypeError: The provided value is not of type 'Element'.

         
    @@ -1180,8 +1242,9 @@ exports[`Renderer:Wizard readOnly 1`] = `
         in WithStore(WizardRenderer) (created by Scoped(WithStore(WizardRenderer)))
         in Scoped(WithStore(WizardRenderer)) (created by Renderer)
         in Renderer (created by RootRenderer)
    -    in ImageGallery (created by Themeable(ImageGallery))
    -    in Themeable(ImageGallery) (created by RootRenderer)
    +    in ImageGallery (created by I18N(ImageGallery))
    +    in I18N(ImageGallery) (created by Themeable(I18N(ImageGallery)))
    +    in Themeable(I18N(ImageGallery)) (created by RootRenderer)
         in RootRenderer (created by Scoped(RootRenderer))
         in Scoped(RootRenderer)
         
    @@ -1192,49 +1255,77 @@ exports[`Renderer:Wizard readOnly 1`] = `
     exports[`Renderer:Wizard send data 1`] = `
     
    -
      -
    • - - 1 - - Step 1 -
    • -
    • - - 2 - - Step 2 -
    • -
    -
    -
    -
    - +
  • + + 1 + + Step 1 +
  • +
  • + + 2 + + Step 2 +
  • + +
    +
    + - 这是最后一步了 - - + + + 这是最后一步了 + + + +
    +
    -
    `; @@ -1302,86 +1373,113 @@ exports[`Renderer:Wizard send data 1`] = ` exports[`Renderer:Wizard step initApi 1`] = `
    -
      -
    • - - 1 - - Step 1 -
    • -
    • - - 2 - - Step 2 -
    • -
    • - - 3 - - Step 3 -
    • -
    -
    -
    -
    -
    -
    +
    + +
    + +
    +
    + +
    -
    -
    + +
    +
    -
    `; @@ -1451,7 +1529,7 @@ exports[`Renderer:Wizard steps not array 1`] = ` className="a-Alert a-Alert--danger" >

    - TypeError: Cannot read property '_ownerDocument' of undefined + TypeError: The provided value is not of type 'Element'.

         
    @@ -1460,8 +1538,9 @@ exports[`Renderer:Wizard steps not array 1`] = `
         in WithStore(WizardRenderer) (created by Scoped(WithStore(WizardRenderer)))
         in Scoped(WithStore(WizardRenderer)) (created by Renderer)
         in Renderer (created by RootRenderer)
    -    in ImageGallery (created by Themeable(ImageGallery))
    -    in Themeable(ImageGallery) (created by RootRenderer)
    +    in ImageGallery (created by I18N(ImageGallery))
    +    in I18N(ImageGallery) (created by Themeable(I18N(ImageGallery)))
    +    in Themeable(I18N(ImageGallery)) (created by RootRenderer)
         in RootRenderer (created by Scoped(RootRenderer))
         in Scoped(RootRenderer)
         
    @@ -1484,49 +1563,77 @@ exports[`Renderer:Wizard target 1`] = `
               class="a-Page-body"
             >
               
    -
      -
    • - - 1 - - Step 1 -
    • -
    • - - 2 - - Step 2 -
    • -
    -
    -
    -
    - +
  • + + 1 + + Step 1 +
  • +
  • + + 2 + + Step 2 +
  • + +
    +
    + - 这是最后一步了 - - + + + 这是最后一步了 + + + +
    +
    -
    - 表单 + + 表单 +
    @@ -1614,6 +1703,7 @@ exports[`Renderer:Wizard target 1`] = ` >
    `; diff --git a/__tests__/stores/__snapshots__/index.test.ts.snap b/__tests__/stores/__snapshots__/index.test.ts.snap index ba3d4655b..ba81162fb 100644 --- a/__tests__/stores/__snapshots__/index.test.ts.snap +++ b/__tests__/stores/__snapshots__/index.test.ts.snap @@ -3,140 +3,23 @@ exports[`store:index 1`] = ` Object { "storeType": "RendererStore", - "stores": Object {}, } `; exports[`store:index 2`] = ` Object { "storeType": "RendererStore", - "stores": Object { - "1": Object { - "action": undefined, - "busying": false, - "checking": false, - "childrenIds": Array [], - "data": Object {}, - "dialogData": undefined, - "dialogOpen": false, - "disposed": false, - "drawerData": undefined, - "drawerOpen": false, - "error": false, - "fetching": false, - "hasRemoteData": false, - "id": "1", - "initedAt": 0, - "initializing": false, - "msg": "", - "parentId": "", - "path": "/xxx", - "pristine": Object {}, - "saving": false, - "schema": null, - "schemaKey": "", - "storeType": "ServiceStore", - "updatedAt": 0, - }, - }, } `; exports[`store:index 3`] = ` Object { "storeType": "RendererStore", - "stores": Object { - "1": Object { - "action": undefined, - "busying": false, - "checking": false, - "childrenIds": Array [ - "2", - ], - "data": Object {}, - "dialogData": undefined, - "dialogOpen": false, - "disposed": false, - "drawerData": undefined, - "drawerOpen": false, - "error": false, - "fetching": false, - "hasRemoteData": false, - "id": "1", - "initedAt": 0, - "initializing": false, - "msg": "", - "parentId": "", - "path": "/xxx", - "pristine": Object {}, - "saving": false, - "schema": null, - "schemaKey": "", - "storeType": "ServiceStore", - "updatedAt": 0, - }, - "2": Object { - "action": undefined, - "busying": false, - "checking": false, - "childrenIds": Array [], - "data": Object {}, - "dialogData": undefined, - "dialogOpen": false, - "disposed": false, - "drawerData": undefined, - "drawerOpen": false, - "error": false, - "fetching": false, - "hasRemoteData": false, - "id": "2", - "initedAt": 0, - "initializing": false, - "msg": "", - "parentId": "1", - "path": "/yyy", - "pristine": Object {}, - "saving": false, - "schema": null, - "schemaKey": "", - "storeType": "ServiceStore", - "updatedAt": 0, - }, - }, } `; exports[`store:index 4`] = ` Object { "storeType": "RendererStore", - "stores": Object { - "1": Object { - "action": undefined, - "busying": false, - "checking": false, - "childrenIds": Array [], - "data": Object {}, - "dialogData": undefined, - "dialogOpen": false, - "disposed": false, - "drawerData": undefined, - "drawerOpen": false, - "error": false, - "fetching": false, - "hasRemoteData": false, - "id": "1", - "initedAt": 0, - "initializing": false, - "msg": "", - "parentId": "", - "path": "/xxx", - "pristine": Object {}, - "saving": false, - "schema": null, - "schemaKey": "", - "storeType": "ServiceStore", - "updatedAt": 0, - }, - }, } `; diff --git a/__tests__/utils/__snapshots__/api.test.ts.snap b/__tests__/utils/__snapshots__/api.test.ts.snap index 9d17c8fff..46e24d10d 100644 --- a/__tests__/utils/__snapshots__/api.test.ts.snap +++ b/__tests__/utils/__snapshots__/api.test.ts.snap @@ -35,7 +35,9 @@ exports[`api:cache 1`] = ` - The variable value is 1 + + The variable value is 1 + @@ -79,7 +81,9 @@ exports[`api:cache 2`] = ` - The variable value is 1 + + The variable value is 1 + diff --git a/package.json b/package.json index 0ecc98219..c5292c373 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "@types/dom-helpers": "^3.4.1", "@types/history": "^4.6.0", "@types/hoist-non-react-statics": "^3.3.1", - "@types/jest": "^24.0.11", + "@types/jest": "^24.9.1", "@types/jquery": "^3.3.1", "@types/lodash": "^4.14.76", "@types/mkdirp": "^1.0.1", @@ -143,8 +143,8 @@ "fs-walk": "0.0.2", "glob": "^7.1.6", "husky": "^2.2.0", - "jest": "^24.5.0", - "jest-canvas-mock": "^2.1.0", + "jest": "^26.6.3", + "jest-canvas-mock": "^2.3.0", "js-yaml": "^3.10.0", "lint-staged": "^8.1.6", "marked": "^1.1.1", @@ -157,7 +157,7 @@ "react-test-renderer": "^16.8.6", "react-testing-library": "6.0.4", "strip-json-comments": "^2.0.1", - "ts-jest": "^24.0.0", + "ts-jest": "^26.4.4", "ts-json-schema-generator": "^0.80.0", "ts-node": "^9.0.0", "typescript": "~4.1.2" diff --git a/src/components/condition-builder/index.tsx b/src/components/condition-builder/index.tsx index c5272eb41..f8acf9a0b 100644 --- a/src/components/condition-builder/index.tsx +++ b/src/components/condition-builder/index.tsx @@ -67,7 +67,7 @@ export class QueryBuilder extends React.Component { } @autobind - handleDragOver(e: DragEvent) { + handleDragOver(e: React.DragEvent) { e.preventDefault(); const item = (e.target as HTMLElement).closest('[data-id]') as HTMLElement;