ywana-core8 0.0.619 → 0.0.620

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.619",
3
+ "version": "0.0.620",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -235,11 +235,12 @@ export const CollectionTree = (props) => {
235
235
  let node = nodes.find(n => n.name === field[by])
236
236
  if (!node) {
237
237
  let name = field[by]
238
+ let title = field[by]
238
239
  if (options) {
239
240
  const opt = options.find(option => option.value === field[by])
240
- if (opt) name = opt.label
241
+ if (opt) title = opt.label
241
242
  }
242
- node = { name, items: [], field: by }
243
+ node = { name, items: [], field: by, title }
243
244
  nodes.push(node)
244
245
  }
245
246
  node.items.push(field)
@@ -256,7 +257,7 @@ export const CollectionTree = (props) => {
256
257
 
257
258
  function renderNodes(nodes) {
258
259
  return nodes.map(node => {
259
- const title = typeof node.name === 'boolean' ? `${node.field} = ${node.name}` : node.name
260
+ const title = typeof node.name === 'boolean' ? `${node.field} = ${node.name}` : node.title
260
261
  return (
261
262
  <TreeNode key={node.name} icon={null} label={title} open={true}>
262
263
  {node.nodes ? renderNodes(node.nodes) : node.items.map(item => {