Skip to content

Commit

Permalink
[Fix][WRS-2284] Use proper format for data source values in input (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
psamusev authored Feb 6, 2025
1 parent ff4cc54 commit cf90aa8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"@babel/preset-env": "^7.25.3",
"@chili-publish/grafx-shared-components": "^0.92.0",
"@chili-publish/grafx-shared-components": "^0.92.1",
"@chili-publish/studio-sdk": "1.19.0",
"@fortawesome/fontawesome-svg-core": "^6.7.1",
"@fortawesome/pro-light-svg-icons": "^6.7.1",
Expand Down
7 changes: 6 additions & 1 deletion src/components/dataSource/useDataSource.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { formatCell } from '@chili-publish/grafx-shared-components';
import { ConnectorEvent, ConnectorEventType, ConnectorHttpError, DataItem } from '@chili-publish/studio-sdk';
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useAsyncMemo } from 'use-async-memo';
Expand Down Expand Up @@ -52,7 +53,11 @@ const useDataSource = () => {
}, [dataRows, currentRowIndex]);

const currentInputRow = useMemo(() => {
return currentRow ? Object.values(currentRow).join(' | ') : '';
return currentRow
? Object.values(currentRow)
.map((v) => formatCell(v))
.join(' | ')
: '';
}, [currentRow]);

const isPrevDisabled = useMemo(() => isLoading || currentRowIndex === 0, [currentRowIndex, isLoading]);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1307,10 +1307,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@chili-publish/grafx-shared-components@^0.92.0":
version "0.92.0"
resolved "https://npm.pkg.github.com/download/@chili-publish/grafx-shared-components/0.92.0/827c0dcb02c031dc62ddea87895da5b352434e19#827c0dcb02c031dc62ddea87895da5b352434e19"
integrity sha512-fIonatbumFgLPFF79d0/1N3RnweI4jP2xDltLawbh6v2G5ZxFmV0L7l1daXqoIfyuExpIWN4G/MBwHxtSXEzaQ==
"@chili-publish/grafx-shared-components@^0.92.1":
version "0.92.2"
resolved "https://npm.pkg.github.com/download/@chili-publish/grafx-shared-components/0.92.2/44cb9664fbc2250d0e021abcd0d89955a5deac26#44cb9664fbc2250d0e021abcd0d89955a5deac26"
integrity sha512-Vc+56HLvZmNQBfAbZ+dVm8Je6c0uVr+1XpWsWH7DEmrO7dDgWRx0l2dOq+v9ZQxGZpZaKeUtn4XQ0n1dGZpPXw==

"@chili-publish/studio-sdk@1.19.0":
version "1.19.0"
Expand Down

0 comments on commit cf90aa8

Please sign in to comment.