@medplum/react 3.2.10 → 3.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -217,6 +217,11 @@ export declare interface AsyncAutocompleteProps<T> extends Omit<ComboboxProps, '
217
217
  readonly toOption: (item: T) => AsyncAutocompleteOption<T>;
218
218
  readonly loadOptions: (input: string, signal: AbortSignal) => Promise<T[]>;
219
219
  readonly itemComponent?: (props: AsyncAutocompleteOption<T>) => JSX.Element | ReactNode;
220
+ readonly pillComponent?: (props: {
221
+ item: AsyncAutocompleteOption<T>;
222
+ disabled?: boolean;
223
+ onRemove: () => void;
224
+ }) => JSX.Element;
220
225
  readonly emptyComponent?: (props: {
221
226
  search: string;
222
227
  }) => JSX.Element | ReactNode;
@@ -1187,6 +1192,8 @@ export declare interface ResourceInputProps<T extends Resource = Resource> {
1187
1192
  readonly itemComponent?: (props: AsyncAutocompleteOption<T>) => JSX.Element | ReactNode;
1188
1193
  readonly onChange?: (value: T | undefined) => void;
1189
1194
  readonly disabled?: boolean;
1195
+ readonly label?: AsyncAutocompleteProps<T>['label'];
1196
+ readonly error?: AsyncAutocompleteProps<T>['error'];
1190
1197
  }
1191
1198
 
1192
1199
  export declare function ResourceName(props: ResourceNameProps): JSX.Element | null;
@@ -1611,7 +1618,7 @@ export declare function useSearchResources<K extends ResourceType>(resourceType:
1611
1618
  * - `onSubscriptionDisconnect` - Called when the corresponding subscription is destroyed and stops receiving updates from the server.
1612
1619
  * - `onError` - Called whenever an error occurs during the lifecycle of the managed subscription.
1613
1620
  */
1614
- export declare function useSubscription(criteria: string, callback: (bundle: Bundle) => void, options?: UseSubscriptionOptions): void;
1621
+ export declare function useSubscription(criteria: string | undefined, callback: (bundle: Bundle) => void, options?: UseSubscriptionOptions): void;
1615
1622
 
1616
1623
  export declare type UseSubscriptionOptions = {
1617
1624
  subscriptionProps?: Partial<Subscription>;
@@ -217,6 +217,11 @@ export declare interface AsyncAutocompleteProps<T> extends Omit<ComboboxProps, '
217
217
  readonly toOption: (item: T) => AsyncAutocompleteOption<T>;
218
218
  readonly loadOptions: (input: string, signal: AbortSignal) => Promise<T[]>;
219
219
  readonly itemComponent?: (props: AsyncAutocompleteOption<T>) => JSX.Element | ReactNode;
220
+ readonly pillComponent?: (props: {
221
+ item: AsyncAutocompleteOption<T>;
222
+ disabled?: boolean;
223
+ onRemove: () => void;
224
+ }) => JSX.Element;
220
225
  readonly emptyComponent?: (props: {
221
226
  search: string;
222
227
  }) => JSX.Element | ReactNode;
@@ -1187,6 +1192,8 @@ export declare interface ResourceInputProps<T extends Resource = Resource> {
1187
1192
  readonly itemComponent?: (props: AsyncAutocompleteOption<T>) => JSX.Element | ReactNode;
1188
1193
  readonly onChange?: (value: T | undefined) => void;
1189
1194
  readonly disabled?: boolean;
1195
+ readonly label?: AsyncAutocompleteProps<T>['label'];
1196
+ readonly error?: AsyncAutocompleteProps<T>['error'];
1190
1197
  }
1191
1198
 
1192
1199
  export declare function ResourceName(props: ResourceNameProps): JSX.Element | null;
@@ -1611,7 +1618,7 @@ export declare function useSearchResources<K extends ResourceType>(resourceType:
1611
1618
  * - `onSubscriptionDisconnect` - Called when the corresponding subscription is destroyed and stops receiving updates from the server.
1612
1619
  * - `onError` - Called whenever an error occurs during the lifecycle of the managed subscription.
1613
1620
  */
1614
- export declare function useSubscription(criteria: string, callback: (bundle: Bundle) => void, options?: UseSubscriptionOptions): void;
1621
+ export declare function useSubscription(criteria: string | undefined, callback: (bundle: Bundle) => void, options?: UseSubscriptionOptions): void;
1615
1622
 
1616
1623
  export declare type UseSubscriptionOptions = {
1617
1624
  subscriptionProps?: Partial<Subscription>;