Skip to content

Commit

Permalink
fix how sl-input handles input
Browse files Browse the repository at this point in the history
  • Loading branch information
SalihuDickson committed Nov 18, 2024
1 parent 589a150 commit e4ca0ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ecc-utils-design/src/components/form/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,9 @@ export default class EccUtilsDesignForm extends LitElement {
const { value } = e.target as HTMLInputElement;
if (!value) {
_.unset(this.form, path);
if (field.fieldOptions?.returnIfEmpty) _.set(this.form, path, null);
} else {
_.set(this.form, path, value);
_.set(this.form, path, value.trim());
}
this.requestUpdate();
this.alertFieldChange(field.key, value);
Expand Down

0 comments on commit e4ca0ea

Please sign in to comment.