Skip to content

Commit

Permalink
Merge pull request #215 from smartprocure/feature/fix-tags-count
Browse files Browse the repository at this point in the history
Fix tags query tag count when value contains dot
  • Loading branch information
stellarhoof authored May 17, 2024
2 parents 18d480f + 763f1f9 commit 86d7f26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-tigers-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'contexture-react': patch
---

Fix tags query tag count when value contains dot
14 changes: 5 additions & 9 deletions packages/react/src/exampleTypes/ExpandableTagsQuery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,16 @@ let TagsWrapper = observer(
}) => {
let TagWithPopover = React.memo(
observer((props) => {
let count = F.cascade(
[
`context.tags.${props.value}`,
`context.keywordGenerations.${props.value}`,
],
node,
node.forceFilterOnly || node.updating
let count =
_.get(['context', 'tags', props.value], node) ??
_.get(['context', 'keywordGenerations', props.value], node) ??
(node.forceFilterOnly || node.updating
? undefined
: F.when(
_.isNaN(),
undefined,
_.get(`context.tags.${props.value}`, node)
)
)
))
let tagProps = {
...props,
...(!_.isNil(count) && {
Expand Down

0 comments on commit 86d7f26

Please sign in to comment.