Skip to content
4 changes: 2 additions & 2 deletions src/core/components/layout-utils.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react"
import PropTypes from "prop-types"
import DebounceInput from "react-debounce-input"

function xclass(...args) {
return args.filter(a => !!a).join(" ").trim()
Expand Down Expand Up @@ -124,8 +125,7 @@ export class Button extends React.Component {

}


export const TextArea = (props) => <textarea {...props} />
export const TextArea = (props) => <DebounceInput element="textarea" debounceTimeout={350} forceNotifyByEnter={false} {...props} />

export const Input = (props) => <input {...props} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ describe("OpenAPI 3.0 Validation for Required Request Body and Request Body Fiel
)
.should("not.have.class", "invalid")
.clear()
.blur() // HACK: force the debounce on the textarea to trigger
// Execute
.get(".execute.opblock-control__btn")
.click()
Expand All @@ -104,6 +105,7 @@ describe("OpenAPI 3.0 Validation for Required Request Body and Request Body Fiel
)
.clear()
.type(" ")
.blur() // HACK: force the debounce on the textarea to trigger
// Execute
.get(".execute.opblock-control__btn")
.click()
Expand Down Expand Up @@ -197,6 +199,7 @@ describe("OpenAPI 3.0 Validation for Required Request Body and Request Body Fiel
)
.should("not.have.class", "invalid")
.clear()
.blur() // HACK: force the debounce on the textarea to trigger
// Execute
.get(".execute.opblock-control__btn")
.click()
Expand Down