mirror of
https://github.com/datahub-project/datahub.git
synced 2025-09-04 14:53:14 +00:00
feat(react): custom properties are now sortable by name in the UI (#2622)
This commit is contained in:
parent
b512920022
commit
2f3de31ec3
@ -1,5 +1,6 @@
|
|||||||
import { Space, Table, Typography } from 'antd';
|
import { Space, Table, Typography } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { ColumnsType } from 'antd/es/table';
|
||||||
import { StringMapEntry } from '../../../types.generated';
|
import { StringMapEntry } from '../../../types.generated';
|
||||||
|
|
||||||
export type Props = {
|
export type Props = {
|
||||||
@ -7,10 +8,12 @@ export type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function Properties({ properties }: Props) {
|
export function Properties({ properties }: Props) {
|
||||||
const propertyTableColumns = [
|
const propertyTableColumns: ColumnsType<StringMapEntry> = [
|
||||||
{
|
{
|
||||||
title: 'Name',
|
title: 'Name',
|
||||||
dataIndex: 'key',
|
dataIndex: 'key',
|
||||||
|
sorter: (a, b) => a.key.localeCompare(b.key),
|
||||||
|
defaultSortOrder: 'ascend',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Value',
|
title: 'Value',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user