From 07e409de6a1c3d362929d854542df0c1d74ce18e Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Mon, 7 Jun 2021 00:54:05 -0400 Subject: [PATCH] fix(*): fix Select types and usages (#724) * stash * more * stash * Revert port change * Fix test * Fix * Update snapshot --- packages/devui/src/Form/widgets.tsx | 21 +++++--- packages/devui/src/Select/Select.stories.tsx | 5 +- packages/devui/src/Select/Select.tsx | 37 ++++++++++--- packages/devui/tests/Select.test.tsx | 14 ++--- .../tests/__snapshots__/Select.test.tsx.snap | 53 ++++++++++--------- .../src/components/InstanceSelector.tsx | 7 +-- .../src/containers/monitors/Dispatcher.tsx | 16 +++--- .../src/index.tsx | 10 ++-- 8 files changed, 105 insertions(+), 58 deletions(-) diff --git a/packages/devui/src/Form/widgets.tsx b/packages/devui/src/Form/widgets.tsx index 1d26c3ab..87e69dfc 100644 --- a/packages/devui/src/Form/widgets.tsx +++ b/packages/devui/src/Form/widgets.tsx @@ -4,13 +4,22 @@ import Select from '../Select'; import Slider from '../Slider'; /* eslint-disable react/prop-types */ -const SelectWidget: Widget = ({ options, onChange, value, ...rest }) => ( - -
+ One +
+
+
+
{ return ( this.selectActionCreator(option!.value)} + value={ + options.find((option) => option.value === this.state.selected) || + options.find((option) => option.value === 'default') + } options={options} />