@vonaffenfels/slate-editor 1.1.13 → 1.1.15

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": "@vonaffenfels/slate-editor",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -72,7 +72,7 @@
72
72
  "cssnano": "^5.0.1",
73
73
  "escape-html": "^1.0.3"
74
74
  },
75
- "gitHead": "7ac51bec76cbf6f02661849c5836c874c4a1a3a6",
75
+ "gitHead": "4ddd52b19eec5a04c2f8f1d585dcd582f551e2a7",
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  }
@@ -177,10 +177,13 @@ export function Serializer({
177
177
  "md:ml-4": props.attributes?.margin?.left,
178
178
  })}
179
179
  >
180
- {props.children.map((v, i) => <div
181
- key={"layout-slot-" + i}
180
+ <div
182
181
  style={{top: props.attributes?.sticky && "80px"}}
183
- className={classNames({"sticky": props.attributes?.sticky})}>{serializeNode(v, i, props.attributes.name)}</div>)}
182
+ className={classNames({"sticky": props.attributes?.sticky})}>
183
+ {props.children.map((v, i) => <div
184
+ key={"layout-slot-" + i}
185
+ >{serializeNode(v, i, props.attributes.name)}</div>)}
186
+ </div>
184
187
  </div>
185
188
  </Wrapper>;
186
189
  default: {
@@ -55,9 +55,16 @@ export const SidebarEditorField = ({
55
55
  <option key={`select-option-${value}`} value={value}>{value}</option>
56
56
  ));
57
57
  } else {
58
- return Object.keys(field.control.options).map(key => (
59
- <option key={`select-option-${key}`} value={field.control.options[key]}>{key}</option>
60
- ));
58
+ return Object.keys(field.control.options).map(key => {
59
+ // Prevents false values being a string, e.g. "false"
60
+ if (!field.control.options[key]) {
61
+ field.control.options[key] = "";
62
+ }
63
+
64
+ return (
65
+ <option key={`select-option-${key}`} value={field.control.options[key]}>{key}</option>
66
+ );
67
+ });
61
68
  }
62
69
  };
63
70