ywana-core8 0.0.234 → 0.0.238

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.234",
3
+ "version": "0.0.238",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -312,10 +312,14 @@ const TableEditor = (props) => {
312
312
 
313
313
  function renderGroupLabel(groupName) {
314
314
  const grouper = schema[groupBy]
315
+
316
+ if (!groupName || !grouper) return ""
317
+
315
318
  if (grouper.options) {
316
319
  const options = CHECK['isFunction'](grouper.options) ? grouper.options() : grouper.options
317
320
  const option = options.find(option => option.value === groupName)
318
- return option.label
321
+ console.log(groupName, options, option )
322
+ return option ? option.label : groupName
319
323
  } else {
320
324
  return groupName
321
325
  }
@@ -371,8 +375,7 @@ const TableEditor = (props) => {
371
375
 
372
376
  return (
373
377
  <Fragment key={groupName}>
374
- <Header title={groupName} >
375
- {renderGroupLabel(groupName)}
378
+ <Header title={renderGroupLabel(groupName)} >
376
379
  <span className="size">{groupSize}</span>
377
380
  </Header>
378
381
  <DataTable {...table} onRowSelection={select} editable={editable} onCheckAll={check} />