mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-11 10:46:52 +00:00
11 lines
524 B
TypeScript
11 lines
524 B
TypeScript
import { DataModelEntity } from '@datahub/data-models/constants/entity';
|
|
|
|
/**
|
|
* Guard function checks if the selected entity isEnabled for search
|
|
* @param {DataModelEntity} entityClass the entity class to check against
|
|
* TODO: META-10750 Refactor out by making the search attribute in IEntityRenderPropsSearch optional,
|
|
* updating call sites with sensible defaults and adding test coverage
|
|
*/
|
|
export const isSearchable = (entityClass: DataModelEntity): boolean =>
|
|
Boolean(entityClass.renderProps?.search?.isEnabled);
|