catalog: export defaultColumnsFunc

Signed-off-by: GoFightNguyen <jsn.dev@outlook.com>
This commit is contained in:
GoFightNguyen
2023-12-24 22:08:15 +00:00
parent 1f6040e4bd
commit f24207eb6c
3 changed files with 9 additions and 2 deletions
+3
View File
@@ -245,6 +245,9 @@ export interface DefaultCatalogPageProps {
tableOptions?: TableProps<CatalogTableRow>['options'];
}
// @public (undocumented)
export const defaultColumnsFunc: CatalogTableColumnsFunc;
// @public
export class DefaultEntityPresentationApi implements EntityPresentationApi {
static create(
@@ -77,7 +77,11 @@ const refCompare = (a: Entity, b: Entity) => {
return toRef(a).localeCompare(toRef(b));
};
const defaultColumnsFunc: CatalogTableColumnsFunc = ({ filters, entities }) => {
/** @public */
export const defaultColumnsFunc: CatalogTableColumnsFunc = ({
filters,
entities,
}) => {
const showTypeColumn = filters.type === undefined;
return [
@@ -14,6 +14,6 @@
* limitations under the License.
*/
export { CatalogTable } from './CatalogTable';
export { CatalogTable, defaultColumnsFunc } from './CatalogTable';
export type { CatalogTableProps } from './CatalogTable';
export type { CatalogTableRow, CatalogTableColumnsFunc } from './types';