Skip to content

Commit

Permalink
Merge pull request #5 from ranglang/main
Browse files Browse the repository at this point in the history
feat: fix oneway crash
  • Loading branch information
BensonCheung authored Sep 28, 2023
2 parents eb7bcaf + f32e90d commit 9315f9f
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 35 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.4",
"version": "1.2.0",
"description": "Pivot table",
"engines": {
"node": ">=8.x"
Expand Down Expand Up @@ -38,8 +38,8 @@
"@types/react": "^16.9.43",
"@types/react-dom": "^16.9.8",
"@apitable/components": "latest",
"@apitable/icons": "latest",
"@apitable/widget-sdk": "latest",
"@apitable/icons": "^1.2.0",
"@apitable/widget-sdk": "^1.2.0",
"ali-react-table": "2.6.1",
"dayjs": "^1.10.7",
"lodash": "^4.17.21",
Expand Down
11 changes: 8 additions & 3 deletions src/components/setting/field_select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ import {
ColumnLongtextFilled,
ColumnPhoneFilled,
ColumnLookupNonzeroFilled,
ColumnSingleNonzeroFilled,
ColumnSingleNonzeroFilled,
ColumnFormulaFilled,
ColumnCheckboxFilled,
CascadeOutlined
CascadeOutlined,
OneWayLinkOutlined,
TwoWayLinkOutlined
} from '@apitable/icons';
import styled from 'styled-components';
import { Strings } from '../../utils/i18n';
Expand All @@ -51,6 +53,9 @@ const FieldIconMap = {
[FieldType.Currency]: ColumnCurrencyFilled,
[FieldType.Percent]: ColumnPercentFilled,
[FieldType.SingleText]: ColumnTextFilled,
[FieldType.OneWayLink]: OneWayLinkOutlined,
[FieldType.TwoWayLink]: TwoWayLinkOutlined,
[FieldType.MagicLink]: TwoWayLinkOutlined,
[FieldType.AutoNumber]: ColumnAutonumberFilled,
[FieldType.CreatedTime]: ColumnCreatedtimeFilled,
[FieldType.LastModifiedTime]: ColumnLastmodifiedtimeFilled,
Expand All @@ -74,7 +79,7 @@ const transformOptions = (enumOptions: { label: string, value: any }[], theme: I
const FieldIcon = FieldIconMap[field.type];
return {
...res,
prefixIcon: <FieldIcon color={theme.palette.text.third} />,
prefixIcon: FieldIcon != null ? <FieldIcon color={theme.palette.text.third} />: null,
};
}).filter(Boolean) as IOption[];
};
Expand Down
Loading

0 comments on commit 9315f9f

Please sign in to comment.