ywana-core8 0.0.177 → 0.0.181
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/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +5 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +5 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +7 -2
- package/src/html/textfield-outlined.css +1 -0
- package/src/html/textfield.css +1 -0
package/package.json
CHANGED
@@ -70,6 +70,8 @@ export const TabbedContentEditor = ({ content, filter, grouped = false, onChange
|
|
70
70
|
|
71
71
|
const sections = content.sections()
|
72
72
|
|
73
|
+
console.log("TabbedContentEditor",sections)
|
74
|
+
|
73
75
|
return (
|
74
76
|
<div className='content-editor tabbed'>
|
75
77
|
<Tabs selected={tab} onChange={changeTab}>
|
@@ -175,11 +177,14 @@ export const FieldEditor = ({ field, onChange, content, outlined = false }) => {
|
|
175
177
|
}
|
176
178
|
|
177
179
|
function renderField() {
|
178
|
-
const value1 = field.value ? field.value : field.default
|
180
|
+
const value1 = field.value || field.value === "" ? field.value : field.default
|
179
181
|
const isHidden = CHECK['isFunction'](hidden) ? hidden(field, value1) : hidden
|
180
182
|
if (isHidden) {
|
181
183
|
return null
|
182
184
|
} else {
|
185
|
+
|
186
|
+
console.log("FieldEditor: ", label, value1)
|
187
|
+
|
183
188
|
switch (type) {
|
184
189
|
case TYPES.ENTITY:
|
185
190
|
return <EntityEditor field={field} value={value1} onChange={change} />
|
@@ -266,7 +271,7 @@ const NumberEditor = ({ field, value, onChange, outlined = false }) => {
|
|
266
271
|
if (onChange) onChange(id, value)
|
267
272
|
}
|
268
273
|
|
269
|
-
const val = value || field.default
|
274
|
+
const val = value || value ==="" ? value : field.default
|
270
275
|
const min = field.min
|
271
276
|
const max = field.max
|
272
277
|
const disabled = !editable
|