From 970a218dec403aac996c1b8d2a310d2ac0358270 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 May 2021 07:47:40 -0500 Subject: [PATCH] Bump react-select from 2.4.3 to 4.3.0 in /graylog2-web-interface (#10298) Co-authored-by: Linus Pahl Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- graylog2-web-interface/package.json | 2 +- .../src/components/common/Select.tsx | 5 +- .../__snapshots__/ListField.test.tsx.snap | 18 +- .../src/views/components/Select.tsx | 4 +- .../aggregationbuilder/SeriesSelect.test.tsx | 36 -- graylog2-web-interface/yarn.lock | 354 ++++++------------ 6 files changed, 126 insertions(+), 293 deletions(-) diff --git a/graylog2-web-interface/package.json b/graylog2-web-interface/package.json index 22e92a049e57..319e0ce839d5 100644 --- a/graylog2-web-interface/package.json +++ b/graylog2-web-interface/package.json @@ -98,7 +98,7 @@ "react-portal": "^4.2.0", "react-resizable": "^1.8.0", "react-rnd": "^10.1.1", - "react-select": "2.4.3", + "react-select": "4.3.0", "react-sizeme": "^2.6.7", "react-sortable-hoc": "^1.7.1", "react-ultimate-pagination": "^1.2.0", diff --git a/graylog2-web-interface/src/components/common/Select.tsx b/graylog2-web-interface/src/components/common/Select.tsx index f3281cb83774..4172a209cccc 100644 --- a/graylog2-web-interface/src/components/common/Select.tsx +++ b/graylog2-web-interface/src/components/common/Select.tsx @@ -18,7 +18,8 @@ import * as React from 'react'; import lodash from 'lodash'; import PropTypes from 'prop-types'; import { DefaultTheme, withTheme } from 'styled-components'; -import ReactSelect, { components as Components, Creatable, createFilter } from 'react-select'; +import ReactSelect, { components as Components, createFilter } from 'react-select'; +import CreatableSelect from 'react-select/creatable'; import { themePropTypes } from 'theme'; @@ -482,7 +483,7 @@ class Select extends React.Component { onReactSelectChange, } = this.props; const { customComponents, value } = this.state; - const SelectComponent = allowCreate ? Creatable : ReactSelect; + const SelectComponent = allowCreate ? CreatableSelect : ReactSelect; let formattedValue = value; diff --git a/graylog2-web-interface/src/components/configurationforms/__snapshots__/ListField.test.tsx.snap b/graylog2-web-interface/src/components/configurationforms/__snapshots__/ListField.test.tsx.snap index bacaf380d70f..cd0cea062f13 100644 --- a/graylog2-web-interface/src/components/configurationforms/__snapshots__/ListField.test.tsx.snap +++ b/graylog2-web-interface/src/components/configurationforms/__snapshots__/ListField.test.tsx.snap @@ -37,21 +37,27 @@ exports[` should render an empty field 1`] = `
+
Select list field
should render an empty field 1`] = `