Skip to content

Commit

Permalink
UIPQB-84: Results viewer doesn't show 0 value for number type
Browse files Browse the repository at this point in the history
  • Loading branch information
UladzislauKutarkin committed Mar 4, 2024
1 parent c885e89 commit fa57538
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [UIPQB-80](https://issues.folio.org/browse/UIPQB-80) Add operators for NumberType and adjust operators for IntegerType.
* [UIPQB-73](https://folio-org.atlassian.net/browse/UIPQB-73) Result Viewer shows current date if date column is not present.
* [UIPQB-82](https://folio-org.atlassian.net/browse/UIPQB-82) [Query Builder] Support querying based on nested objects within arrays.
* [UIPQB-84](https://folio-org.atlassian.net/browse/UIPQB-84) Results viewer doesn't show 0 value for number type.

## [1.0.0](https://github.com/folio-org/ui-plugin-query-builder/tree/v1.0.0) (2023-10-12)

Expand Down
6 changes: 6 additions & 0 deletions src/QueryBuilder/ResultViewer/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ export const getTableMetadata = (entityType) => {
return item[value] ? <FormattedDate value={item[value]} /> : '';
} else if (dataType === DATA_TYPES.ArrayType) {
return item[value]?.join(' | ');
} else if (dataType === DATA_TYPES.NumberType) {
if (item[value] === undefined) {
return '';
}

return item[value];
} else {
// If value is empty we will return empty string
// instead of undefined
Expand Down

0 comments on commit fa57538

Please sign in to comment.