diff --git a/.changeset/input-submit.md b/.changeset/input-submit.md new file mode 100644 index 0000000000..91c95230d1 --- /dev/null +++ b/.changeset/input-submit.md @@ -0,0 +1,4 @@ +--- +"@patternfly/elements": patch +--- +``: pressing `Enter` will request to submit the form diff --git a/elements/pf-text-input/demo/form-submission.html b/elements/pf-text-input/demo/form-submission.html new file mode 100644 index 0000000000..b314ab251f --- /dev/null +++ b/elements/pf-text-input/demo/form-submission.html @@ -0,0 +1,24 @@ +
+ + +

Form status: unsubmitted

+
+ + + + + + diff --git a/elements/pf-text-input/pf-text-input.ts b/elements/pf-text-input/pf-text-input.ts index e1d5ce2ae3..a22b15a515 100644 --- a/elements/pf-text-input/pf-text-input.ts +++ b/elements/pf-text-input/pf-text-input.ts @@ -156,7 +156,8 @@ export class PfTextInput extends LitElement { /** Trim text on left */ @property({ type: Boolean, reflect: true, attribute: 'left-truncated' }) leftTruncated = false; - /** Value to indicate if the input is modified to show that validation state. + /** + * Value to indicate if the input is modified to show that validation state. * If set to success, input will be modified to indicate valid state. * If set to warning, input will be modified to indicate warning state. * Invalid inputs will display an error state @@ -233,8 +234,9 @@ export class PfTextInput extends LitElement {