Skip to content
5 changes: 5 additions & 0 deletions packages/core/cms/faststore/sections.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@
"type": "object",
"required": ["sort"],
"properties": {
"searchProductsTitle": {
"title": "Search Products Title for Search Results Dropdown",
"type": "string",
"default": "Suggested Products"
},
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"placeholder": {
"title": "Placeholder for Search Bar",
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ function Navbar({
placeholder={searchInput?.placeholder}
sort={searchInput?.sort}
quickOrderSettings={searchInput?.quickOrderSettings}
searchProductsTitle={searchInput?.searchProductsTitle}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
/>
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import type {
import { formatSearchPath } from 'src/sdk/search/formatSearchPath'

interface SearchDropdownProps {
searchProductsTitle?: string
sort: SearchState['sort']
quickOrderSettings?: NavbarProps['searchInput']['quickOrderSettings']
[key: string]: any
Expand All @@ -45,6 +46,7 @@ function SearchDropdown({
sort,
quickOrderSettings,
onChangeCustomSearchDropdownVisible,
searchProductsTitle,
...otherProps
}: SearchDropdownProps) {
const {
Expand Down Expand Up @@ -96,6 +98,7 @@ function SearchDropdown({
data-af-element={searchId && 'search-autocomplete'}
data-af-onimpression={!!searchId}
data-af-search-id={searchId}
title={searchProductsTitle}
>
{products.map((product, index) => {
const productParsed = product as ProductSummary_ProductFragment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export type SearchInputProps = {
placeholder?: string
quickOrderSettings?: NavbarProps['searchInput']['quickOrderSettings']
sort?: string
searchProductsTitle?: string
} & Omit<UISearchInputFieldProps, 'onSubmit'>

export type SearchInputRef = UISearchInputFieldRef & {
Expand All @@ -77,6 +78,7 @@ const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
sort,
placeholder,
quickOrderSettings,
searchProductsTitle,
...otherProps
},
ref
Expand Down Expand Up @@ -179,6 +181,7 @@ const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
onChangeCustomSearchDropdownVisible={
setCustomSearchDropdownVisibleCondition
}
searchProductsTitle={searchProductsTitle}
/>
</Suspense>
)}
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/components/sections/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface NavbarProps {
searchInput: {
placeholder?: string
sort: string
searchProductsTitle?: string
quickOrderSettings?: {
quickOrder: boolean
skuMatrix: {
Expand Down