ywana-core8 0.0.84 → 0.0.85

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.84",
3
+ "version": "0.0.85",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -15,24 +15,26 @@ export const ContentEditor = ({ content, filter, onChange }) => {
15
15
  }
16
16
 
17
17
  const sections = content.sections()
18
+ console.log('ContentEditor:sections', sections)
19
+
18
20
  return (
19
21
  <div className='content-editor'>
20
22
  {sections
21
- .filter(section => section.fields && 0 < section.fields.length)
22
- .map((section) => {
23
- const { title, fields } = section
24
- return (
25
- <section key={title}>
26
- <header>{title}</header>
27
- <main>
28
- {fields
29
- .filter(field => field.id !== 'id')
30
- .filter(field => filter ? filter(field, content) : true)
31
- .map((field) => <FieldEditor key={field.id} field={field} onChange={change} outlined={true} />)}
32
- </main>
33
- </section>
34
- )
35
- })}
23
+ .filter(section => section.fields && section.fields.length > 0)
24
+ .map((section) => {
25
+ const { title, fields } = section
26
+ return (
27
+ <section key={title}>
28
+ <header>{title}</header>
29
+ <main>
30
+ {fields
31
+ .filter(field => field.id !== 'id')
32
+ .filter(field => filter ? filter(field, content) : true)
33
+ .map((field) => <FieldEditor key={field.id} field={field} onChange={change} outlined={true} />)}
34
+ </main>
35
+ </section>
36
+ )
37
+ })}
36
38
  </div>
37
39
  )
38
40
  }