catalog: export defaultColumnsFunc
Signed-off-by: GoFightNguyen <jsn.dev@outlook.com>
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user