react-storefront icon indicating copy to clipboard operation
react-storefront copied to clipboard

Custom submit button component for SearchField

Open ScyDev opened this issue 2 years ago • 0 comments

In the code of SearchField.js I see this:

  /**
   * The component to use for the submit button.
   */
  SubmitButtonComponent: _propTypes["default"].elementType,

Does this mean we can pass our own custom component to be used for the submit button?

I tried this, but didn't work:

          <SearchHeader>
            <SearchField onChange={value => updateSearchTerm(value)} value={query} SubmitButtonComponent={CustomSearchButton} >
          </SearchHeader>

ScyDev avatar Mar 04 '22 09:03 ScyDev