From 129868dcc79856777bca6bc2c1797dc6c2043bff Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Mon, 4 Mar 2019 09:13:49 -0500 Subject: [PATCH 1/3] root-198: bump version of solr-faceted-search-react --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 80df6dd..d375252 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7410,7 +7410,7 @@ sockjs@0.3.18: "solr-faceted-search-react@git+ssh://git@github.com:palantirnet/solr-faceted-search-react#root-138-autocomplete": version "0.12.1" - resolved "git+ssh://git@github.com:palantirnet/solr-faceted-search-react#82eb9366e0650b43be57565139da296ffc62e565" + resolved "git+ssh://git@github.com:palantirnet/solr-faceted-search-react#f0df9079a3a0e56d866ff2640c780decc645617a" dependencies: classnames "^2.2.5" prop-types "^15.6.1" From 4284f19d2d6ca7db4e077841a02f138e9b44fdd0 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Mon, 4 Mar 2019 09:14:43 -0500 Subject: [PATCH 2/3] root-198: update autocomplete config * adds appendWildcard (defaults to false) * makes suggestionRows optional (defaults to 5) * removes suggestQueryField (sets to mainQueryField) --- src/.env.local.js.example | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/.env.local.js.example b/src/.env.local.js.example index f6015dd..2f88f31 100644 --- a/src/.env.local.js.example +++ b/src/.env.local.js.example @@ -46,11 +46,11 @@ module.exports = { // 'ds_federated_date', // 'sm_federated_terms', // ], - // OPTIONAL: Provides config for adding autocomplete functionality to text search + // OPTIONAL: Provides config for adding autocomplete functionality to text search, defaults to false // autocomplete : { // url: , // required @todo document accepted types - // queryField: 'tem_suggestion_title', // REQUIRED - // suggestionRows: 5, // REQUIRED: no current default set + // appendWildcard: true, // OPTIONAL: defaults to false, whether or not to append wildcard to query term + // suggestionRows: 5, // OPTIONAL: defaults to 5 // numChars: 2, // OPTIONAL: defaults to 2, number of characters *after* which autocomplete results should appear // mode: 'result', // REQUIRED: show search-as-you-type results ('result', default) or search term ('term') suggestions // result: { // OPTIONAL: define result based autocomplete-specific config From f32f7f90ac7afe920463994307243351051b4089 Mon Sep 17 00:00:00 2001 From: Jes Constantine Date: Wed, 6 Mar 2019 11:19:03 -0500 Subject: [PATCH 3/3] root-198: fix bug where keyboard directions were not able to be hidden --- src/.env.local.js.example | 2 +- src/components/text-search/search-as-you-type.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/.env.local.js.example b/src/.env.local.js.example index 2f88f31..2da4d1f 100644 --- a/src/.env.local.js.example +++ b/src/.env.local.js.example @@ -59,7 +59,7 @@ module.exports = { // }, // term: { // OPTIONAL: define term based autocomplete-specific config // titleText: 'What would you like to search for?', // OPTIONAL: default set - // showDirectionsText: true, // OPTIONAL: defaults to false + // showDirectionsText: false, // OPTIONAL: defaults to true // }, // }, }; diff --git a/src/components/text-search/search-as-you-type.js b/src/components/text-search/search-as-you-type.js index 4f499e9..4e47830 100644 --- a/src/components/text-search/search-as-you-type.js +++ b/src/components/text-search/search-as-you-type.js @@ -178,14 +178,14 @@ class FederatedTextSearchAsYouType extends React.Component { ? this.props.autocomplete.result.titleText : 'What are you looking for?'; const resultShowDirectionsText = hasResultModeConfig - && this.props.autocomplete.result.showDirectionsText + && Object.hasOwnProperty.call(this.props.autocomplete.result, 'showDirectionsText') ? this.props.autocomplete.result.showDirectionsText : true; const termTitleText = hasTermModeConfig && this.props.autocomplete.term.titleText ? this.props.autocomplete.term.titleText : 'Suggested search terms'; const termShowDirectionsText = hasTermModeConfig - && this.props.autocomplete.term.showDirectionsText + && Object.hasOwnProperty.call(this.props.autocomplete.term, 'showDirectionsText') ? this.props.autocomplete.term.showDirectionsText : true;