catalog-react: Remove useEntityListProvider
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-react': minor
|
||||
---
|
||||
|
||||
**BREAKING**: Removed `useEntityListProvider` use `useEntityList` instead.
|
||||
@@ -544,11 +544,6 @@ export function useEntityList<
|
||||
EntityFilters extends DefaultEntityFilters = DefaultEntityFilters,
|
||||
>(): EntityListContextProps<EntityFilters>;
|
||||
|
||||
// @public @deprecated
|
||||
export function useEntityListProvider<
|
||||
EntityFilters extends DefaultEntityFilters = DefaultEntityFilters,
|
||||
>(): EntityListContextProps<EntityFilters>;
|
||||
|
||||
// @public
|
||||
export function useEntityOwnership(): {
|
||||
loading: boolean;
|
||||
|
||||
@@ -29,7 +29,6 @@ export { useEntityCompoundName } from './useEntityCompoundName';
|
||||
export {
|
||||
EntityListContext,
|
||||
EntityListProvider,
|
||||
useEntityListProvider,
|
||||
useEntityList,
|
||||
} from './useEntityListProvider';
|
||||
export type {
|
||||
|
||||
@@ -249,20 +249,6 @@ export const EntityListProvider = <EntityFilters extends DefaultEntityFilters>({
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Hook for interacting with the entity list context provided by the {@link EntityListProvider}.
|
||||
* @public
|
||||
* @deprecated use {@link useEntityList} instead.
|
||||
*/
|
||||
export function useEntityListProvider<
|
||||
EntityFilters extends DefaultEntityFilters = DefaultEntityFilters,
|
||||
>(): EntityListContextProps<EntityFilters> {
|
||||
const context = useContext(EntityListContext);
|
||||
if (!context)
|
||||
throw new Error('useEntityList must be used within EntityListProvider');
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook for interacting with the entity list context provided by the {@link EntityListProvider}.
|
||||
* @public
|
||||
|
||||
Reference in New Issue
Block a user