File tree Expand file tree Collapse file tree 3 files changed +5
-18
lines changed
packages/connect-react/src Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { useApps } from "../hooks/use-apps";
66import { AppResponse } from "@pipedream/sdk" ;
77
88type SelectAppProps = {
9- value ?: Partial < AppResponse > & { name_slug : string ; name : string ; id : string } ;
9+ value ?: Partial < AppResponse > & { name_slug : string ; } ;
1010 onChange ?: ( app ?: AppResponse ) => void ;
1111} ;
1212
@@ -25,7 +25,6 @@ export function SelectApp({
2525 } = useApps ( {
2626 q,
2727 } ) ;
28- console . log ( "apps: " , apps ) ;
2928 const { Option, SingleValue } = components ;
3029 const selectedValue = apps ?. find ( ( o ) => o . name_slug === value ?. name_slug ) || null ;
3130 return (
@@ -71,20 +70,12 @@ export function SelectApp({
7170 IndicatorSeparator : ( ) => null ,
7271 } }
7372 options = { apps || [ ] }
74- //options={[...(value ? [value] : []), ...apps]}
7573 getOptionLabel = { ( o ) => o . name || o . name_slug } // TODO fetch initial value app so we show name
7674 getOptionValue = { ( o ) => o . name_slug }
7775 value = { selectedValue }
78- // value={apps?.find((app) => app.name_slug === value?.name_slug) || null}
79- onChange = { ( o ) => {
80- console . log ( "onChange" , o ) ;
81- onChange ?.( ( o as AppResponse ) || undefined )
82- } }
76+ onChange = { ( o ) => onChange ?.( ( o as AppResponse ) || undefined ) }
8377 onInputChange = { ( v ) => {
84- console . log ( "onInputChange" , v ) ;
85- if ( v ) {
86- setQ ( v )
87- }
78+ if ( v ) setQ ( v )
8879 } }
8980 isLoading = { isLoading }
9081 />
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ import { useComponents } from "../hooks/use-components";
44import { AppResponse , V1Component } from "@pipedream/sdk" ;
55
66type SelectComponentProps = {
7- app ?: Partial < AppResponse > & { name_slug : string } ;
7+ app ?: Partial < AppResponse > & { name_slug : string ; } ;
88 componentType ?: "action" | "trigger" ;
9- value ?: Partial < V1Component > & { key : string } ;
9+ value ?: Partial < V1Component > & { key : string ; } ;
1010 onChange ?: ( component ?: V1Component ) => void ;
1111} ;
1212
@@ -41,4 +41,3 @@ export function SelectComponent({
4141 />
4242 ) ;
4343}
44-
Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ export const useApps = (input?: GetAppsOpts) => {
1313 input ,
1414 ] ,
1515 queryFn : ( ) => client . apps ( input ) ,
16- // keepPreviousData: true,
17- // staleTime: 1000 * 60 * 5, // Cache results for 5 minutes
18- // cacheTime: 1000 * 60 * 10, // Keep cache for 10 minutes
1916 } ) ;
2017
2118 return {
You can’t perform that action at this time.
0 commit comments