frontend-collective / frontend-collective/react-sortable-tree
Subtitle not rendered as expected when its values is zero
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
### Problem
When the value of the **Subtitle** is equal to **zero** the size of the **Title** becomes bigger and the value of the **Subtitle** stays in front of the Title instead of below it.
### Screenshot

### Sugestion
In line 151 of the file [node-renderer-default.js](https://github1s.com/frontend-collective/react-sortable-tree/blob/HEAD/src/node-renderer-default.js) there is no verification if the variable `nodeSubtitle` is an integer, so the value zero becomes falsy.
##### Reference
Here is an [article](https://kentcdodds.com/blog/use-ternaries-rather-than-and-and-in-jsx) that may help to solve the problem.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.