Skip to content

Commit

Permalink
remove unused verticalKey config from Facets + FilterBox (#1724)
Browse files Browse the repository at this point in the history
verticalKey is not used internally by these components anywhere.

J=SLAP-2041
TEST=manual

facets + filterbox still work
  • Loading branch information
oshi97 committed Apr 19, 2022
1 parent cfe5753 commit b8d8f00
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 21 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1346,8 +1346,6 @@ ANSWERS.addComponent('FilterBox', {
]
}
],
// Required, the vertical key for the search, default null
verticalKey: 'verticalKey',
// Optional, title to display above the filter
title: 'Filters',
// Optional, show number of results for each filter
Expand Down Expand Up @@ -1395,8 +1393,6 @@ The Facets component displays filters relevant to the current search, configured
ANSWERS.addComponent('Facets', {
// Required, the selector for the container element where the component will be injected
container: '.facets-container',
// Required
verticalKey: '<VERTICAL_KEY>',
// Optional, title to display above the facets
title: 'Filters',
// Optional, show number of results for each facet
Expand Down
4 changes: 2 additions & 2 deletions conf/i18n/translations/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,12 @@ msgctxt "Title of section"
msgid "Ask a Question"
msgstr ""

#: src/ui/components/filters/facetscomponent.js:306
#: src/ui/components/filters/facetscomponent.js:299
msgctxt "True or False"
msgid "False"
msgstr ""

#: src/ui/components/filters/facetscomponent.js:303
#: src/ui/components/filters/facetscomponent.js:296
msgctxt "True or False"
msgid "True"
msgstr ""
Expand Down
8 changes: 0 additions & 8 deletions src/ui/components/filters/facetscomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,6 @@ export default class FacetsComponent extends Component {

this.config = new FacetsConfig(config);

/**
* The vertical key for the search
* @type {string}
* @private
*/
this._verticalKey = config.verticalKey;

/**
* The selector of the apply button
* @type {string}
Expand Down Expand Up @@ -355,7 +348,6 @@ export default class FacetsComponent extends Component {
parentContainer: this._container,
name: `${this.name}.filterbox`,
container: '.js-yxt-Facets',
verticalKey: this._verticalKey,
resetFilter: this.config.resetFacet,
resetFilters: this.config.resetFacets,
resetFilterLabel: this.config.resetFacetLabel,
Expand Down
7 changes: 0 additions & 7 deletions src/ui/components/filters/filterboxcomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,6 @@ export default class FilterBoxComponent extends Component {
'FilterBox');
}

/**
* The vertical key for the search
* @type {string}
* @private
*/
this._verticalKey = config.verticalKey || null;

/**
* The components created for each filter config
* @type {Component[]}
Expand Down

0 comments on commit b8d8f00

Please sign in to comment.