From ccbff592d2ebb71cf5f384e335be1e8b80285578 Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Fri, 26 Oct 2018 14:51:33 +0200 Subject: [PATCH] adding default value and update actions --- .../core/components/Picker/SimplePicker.tsx | 23 +++++++------ .../app/features/dashboard/state/actions.ts | 20 +++++++++++- public/app/features/org/OrgDetailsPage.tsx | 28 ++++++++++------ public/app/features/org/OrgPreferences.tsx | 15 +++++++-- public/app/features/org/OrgProfile.tsx | 9 +++++- public/app/features/org/state/actions.ts | 32 +++++++++++-------- 6 files changed, 89 insertions(+), 38 deletions(-) diff --git a/public/app/core/components/Picker/SimplePicker.tsx b/public/app/core/components/Picker/SimplePicker.tsx index 9e00f06d8c3..6c9e8aca199 100644 --- a/public/app/core/components/Picker/SimplePicker.tsx +++ b/public/app/core/components/Picker/SimplePicker.tsx @@ -4,17 +4,19 @@ import DescriptionOption from './DescriptionOption'; import ResetStyles from './ResetStyles'; interface Props { - options: any[]; className?: string; + defaultValue: any; + getOptionLabel: (item: any) => string; + getOptionValue: (item: any) => string; + onSelected: (item: any) => {} | void; + options: any[]; placeholder?: string; width: number; - onSelected: (item: any) => {} | void; - getOptionValue: (item: any) => string; - getOptionLabel: (item: any) => string; } const SimplePicker: SFC = ({ className, + defaultValue, getOptionLabel, getOptionValue, onSelected, @@ -24,18 +26,19 @@ const SimplePicker: SFC = ({ }) => { return (