Skip to content

Commit 3e698e8

Browse files
committed
Ensure space between input and errors. Always trigger change and block at the validation level
1 parent 6137938 commit 3e698e8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/renderer/src/stories/JSONSchemaInput.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,21 +166,22 @@ export class JSONSchemaInput extends LitElement {
166166
updated() {
167167
const el = this.getElement();
168168
if (el) {
169-
if (this.validateEmptyValue || (el.value ?? el.checked) !== "") el.dispatchEvent(new Event("change"));
169+
el.dispatchEvent(new Event("change"));
170170
}
171171
}
172172

173173
render() {
174174
const { info } = this;
175175

176176
const input = this.#render();
177+
177178
return html`
178179
${input}
180+
<p class="guided--text-input-instructions">
179181
${info.description
180-
? html`<p class="guided--text-input-instructions">
181-
${unsafeHTML(capitalize(info.description))}${info.description.slice(-1)[0] === "." ? "" : "."}
182-
</p>`
182+
? html`${unsafeHTML(capitalize(info.description))}${info.description.slice(-1)[0] === "." ? "" : "."}`
183183
: ""}
184+
</p>
184185
`;
185186
}
186187

0 commit comments

Comments
 (0)