@@ -7,19 +7,13 @@ Attempt to load entity owner names in the EntityOwnerPicker through the `by-refs
|
||||
**BREAKING**: `EntityOwnerFilter` now uses the full entity ref instead of the `humanizeEntityRef`. If you rely on `EntityOwnerFilter.values` or the `queryParameters.owners` of `useEntityList`, you will need to adjust your code like the following.
|
||||
|
||||
```tsx
|
||||
const {queryParameters: {owners}} = useEntityList();
|
||||
const { queryParameters: { owners } } = useEntityList();
|
||||
// or
|
||||
const {filter: {owners}} = useEntityList();
|
||||
const { filter: { owners } } = useEntityList();
|
||||
|
||||
// Instead of,
|
||||
...
|
||||
if(owners.some(ref=>ref === humanizeEntityRef(myEntity))){
|
||||
...
|
||||
}
|
||||
if (owners.some(ref => ref === humanizeEntityRef(myEntity))) ...
|
||||
|
||||
// You'll need to use,
|
||||
...
|
||||
if(owners.some(ref=>ref === stringifyEntityRef(myEntity))){
|
||||
...
|
||||
}
|
||||
if (owners.some(ref => ref === stringifyEntityRef(myEntity))) ...
|
||||
```
|
||||
|
||||
@@ -452,15 +452,6 @@ export function getEntitySourceLocation(
|
||||
scmIntegrationsApi: ScmIntegrationRegistry,
|
||||
): EntitySourceLocation | undefined;
|
||||
|
||||
// @public
|
||||
export function humanizeEntity(
|
||||
entity: Entity,
|
||||
opts?: {
|
||||
defaultKind?: string;
|
||||
defaultNamespace?: string | false;
|
||||
},
|
||||
): string;
|
||||
|
||||
// @public (undocumented)
|
||||
export function humanizeEntityRef(
|
||||
entityRef: Entity | CompoundEntityRef,
|
||||
|
||||
@@ -18,4 +18,4 @@ export { EntityRefLink } from './EntityRefLink';
|
||||
export type { EntityRefLinkProps } from './EntityRefLink';
|
||||
export { EntityRefLinks } from './EntityRefLinks';
|
||||
export type { EntityRefLinksProps } from './EntityRefLinks';
|
||||
export { humanizeEntityRef, humanizeEntity } from './humanize';
|
||||
export { humanizeEntityRef } from './humanize';
|
||||
|
||||
Reference in New Issue
Block a user