From 957f1a61be75ace2d010462d2df47e24ea5953e6 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Wed, 26 Jan 2022 11:56:08 +0200 Subject: [PATCH] Fix expanded (#1877) * fix: fields not expanding after esbuild migration * chore: fix local dev * update snapshot Co-authored-by: Oprysk --- demo/webpack.config.ts | 2 +- .../__snapshots__/DiscriminatorDropdown.test.tsx.snap | 8 ++++++++ src/services/models/Field.ts | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/demo/webpack.config.ts b/demo/webpack.config.ts index 6037b9b7..d189144a 100644 --- a/demo/webpack.config.ts +++ b/demo/webpack.config.ts @@ -85,7 +85,7 @@ export default (env: { playground?: boolean; bench?: boolean } = {}, { mode }) = { test: /\.css$/, use: [ - 'style-loader', + 'isomorphic-style-loader', 'css-loader', { loader: 'esbuild-loader', diff --git a/src/components/__tests__/__snapshots__/DiscriminatorDropdown.test.tsx.snap b/src/components/__tests__/__snapshots__/DiscriminatorDropdown.test.tsx.snap index 623b783e..d5856568 100644 --- a/src/components/__tests__/__snapshots__/DiscriminatorDropdown.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/DiscriminatorDropdown.test.tsx.snap @@ -46,6 +46,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView "deprecated": false, "description": "", "example": undefined, + "expanded": undefined, "explode": false, "in": undefined, "kind": "field", @@ -285,6 +286,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView "deprecated": false, "description": "", "example": undefined, + "expanded": undefined, "explode": false, "in": undefined, "kind": "field", @@ -781,6 +783,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView "deprecated": false, "description": "", "example": undefined, + "expanded": undefined, "explode": false, "in": undefined, "kind": "field", @@ -1020,6 +1023,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView "deprecated": false, "description": "", "example": undefined, + "expanded": undefined, "explode": false, "in": undefined, "kind": "field", @@ -1752,6 +1756,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView "deprecated": false, "description": "", "example": undefined, + "expanded": undefined, "explode": false, "in": undefined, "kind": "field", @@ -1991,6 +1996,7 @@ exports[`Components SchemaView discriminator should correctly render SchemaView "deprecated": false, "description": "", "example": undefined, + "expanded": undefined, "explode": false, "in": undefined, "kind": "field", @@ -2482,6 +2488,7 @@ exports[`Components SchemaView discriminator should correctly render discriminat "deprecated": false, "description": "", "example": undefined, + "expanded": undefined, "explode": false, "in": undefined, "kind": "field", @@ -2537,6 +2544,7 @@ exports[`Components SchemaView discriminator should correctly render discriminat "deprecated": false, "description": "", "example": undefined, + "expanded": undefined, "explode": false, "in": undefined, "kind": "field", diff --git a/src/services/models/Field.ts b/src/services/models/Field.ts index fe798e79..84efa5f0 100644 --- a/src/services/models/Field.ts +++ b/src/services/models/Field.ts @@ -41,7 +41,7 @@ const DEFAULT_SERIALIZATION: Record< */ export class FieldModel { @observable - expanded: boolean | undefined; + expanded: boolean | undefined = undefined; schema: SchemaModel; name: string;