From: Michal Klobukowski Date: Fri, 16 Nov 2018 10:46:50 +0000 (+0100) Subject: Extract PickerIdProps interface X-Git-Tag: 1.3.0~23^2^2^2^2~3 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/2636921500b01485584eb43263815957b867122a Extract PickerIdProps interface Feature #14470 Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski --- diff --git a/src/store/tree-picker/picker-id.tsx b/src/store/tree-picker/picker-id.tsx index 56219545..3907ba8e 100644 --- a/src/store/tree-picker/picker-id.tsx +++ b/src/store/tree-picker/picker-id.tsx @@ -4,9 +4,13 @@ import * as React from 'react'; +export interface PickerIdProp { + pickerId: string; +} + export const pickerId = (id: string) => -

(Component: React.ComponentType

) => +

(Component: React.ComponentType

) => (props: P) => ; \ No newline at end of file diff --git a/src/views-components/dialog-copy/dialog-collection-partial-copy.tsx b/src/views-components/dialog-copy/dialog-collection-partial-copy.tsx index a56ecca5..095c2b9c 100644 --- a/src/views-components/dialog-copy/dialog-collection-partial-copy.tsx +++ b/src/views-components/dialog-copy/dialog-collection-partial-copy.tsx @@ -9,10 +9,11 @@ import { CollectionNameField, CollectionDescriptionField, CollectionProjectPicke import { WithDialogProps } from '~/store/dialog/with-dialog'; import { InjectedFormProps } from 'redux-form'; import { CollectionPartialCopyFormData } from '~/store/collections/collection-partial-copy-actions'; +import { PickerIdProp } from "~/store/tree-picker/picker-id"; type DialogCollectionPartialCopyProps = WithDialogProps & InjectedFormProps; -export const DialogCollectionPartialCopy = (props: DialogCollectionPartialCopyProps & { pickerId: string }) => +export const DialogCollectionPartialCopy = (props: DialogCollectionPartialCopyProps & PickerIdProp) => & InjectedFormProps; -export const DialogCopy = (props: CopyFormDialogProps & { pickerId: string }) => +export const DialogCopy = (props: CopyFormDialogProps & PickerIdProp) => & InjectedFormProps & { pickerId: string }) => +export const DialogMoveTo = (props: WithDialogProps & InjectedFormProps & PickerIdProp) => , 'onContextMenu' | 'toggleItemActive' | 'toggleItemOpen' | 'toggleItemSelection'>; @@ -89,7 +90,7 @@ const renderTreeItem = (item: TreeItem) => isActive={item.active} hasMargin={true} />; -export const ProjectTreePickerField = (props: WrappedFieldProps & { pickerId: string }) => +export const ProjectTreePickerField = (props: WrappedFieldProps & PickerIdProp) =>