15768: fixed single v multi move bug Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa...
[arvados.git] / src / store / tree-picker / picker-id.tsx
index 562195455655ee98ae717f8a46475075006718d3..5734ad70c61df76f1f99f25314003ed07ae2fab3 100644 (file)
@@ -2,11 +2,20 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from "react";
+
+export interface PickerIdProp {
+    pickerId: string;
+}
 
 export const pickerId =
     (id: string) =>
-        <P extends { pickerId: string }>(Component: React.ComponentType<P>) =>
-            (props: P) =>
-                <Component {...props} pickerId={id} />;
-                
\ No newline at end of file
+    <P extends PickerIdProp>(Component: React.ComponentType<P>) =>
+    (props: P) => {
+        return (
+            <Component
+                {...props}
+                pickerId={id}
+            />
+        );
+    };