From affb04a3ce70f41f88737922913b0cd28a8e5eb0 Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Fri, 26 Oct 2018 14:15:37 +0200 Subject: [PATCH] moved state to redux, renamed entities --- .../core/components/Picker/SimplePicker.tsx | 16 +++- public/app/features/org/OrgDetailsPage.tsx | 86 +++++++++---------- public/app/features/org/OrgPreferences.tsx | 32 +++---- public/app/features/org/state/actions.ts | 82 +++++++++++++++--- public/app/features/org/state/reducers.ts | 28 ++++-- public/app/store/configureStore.ts | 4 +- public/app/types/index.ts | 8 +- public/app/types/organization.ts | 8 +- 8 files changed, 172 insertions(+), 92 deletions(-) diff --git a/public/app/core/components/Picker/SimplePicker.tsx b/public/app/core/components/Picker/SimplePicker.tsx index c7d0fcd0549..9e00f06d8c3 100644 --- a/public/app/core/components/Picker/SimplePicker.tsx +++ b/public/app/core/components/Picker/SimplePicker.tsx @@ -6,18 +6,28 @@ import ResetStyles from './ResetStyles'; interface Props { options: any[]; className?: string; + placeholder?: string; + width: number; onSelected: (item: any) => {} | void; getOptionValue: (item: any) => string; getOptionLabel: (item: any) => string; } -const SimplePicker: SFC = ({ className, getOptionLabel, getOptionValue, onSelected, options }) => { +const SimplePicker: SFC = ({ + className, + getOptionLabel, + getOptionValue, + onSelected, + options, + placeholder, + width, +}) => { return (