mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: simplifies updating searchedTerms from connectors (#10674)
This commit is contained in:
parent
324aa3eb61
commit
53e281a3fd
@ -412,6 +412,12 @@ export default Component.extend({
|
|||||||
this.updateInRegex(REGEXP_SPECIAL_IN_TITLE_MATCH, "title");
|
this.updateInRegex(REGEXP_SPECIAL_IN_TITLE_MATCH, "title");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@action
|
||||||
|
onChangeSearchedTermField(path, updateFnName, value) {
|
||||||
|
this.set(`searchedTerms.${path}`, value);
|
||||||
|
this[updateFnName]();
|
||||||
|
},
|
||||||
|
|
||||||
_updateSearchTermForTags() {
|
_updateSearchTermForTags() {
|
||||||
const match = this.filterBlocks(REGEXP_TAGS_PREFIX);
|
const match = this.filterBlocks(REGEXP_TAGS_PREFIX);
|
||||||
const tagFilter = this.get("searchedTerms.tags");
|
const tagFilter = this.get("searchedTerms.tags");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{plugin-outlet name="advanced-search-options-above" args=(hash searchedTerms=searchedTerms) tagName=""}}
|
{{plugin-outlet name="advanced-search-options-above" args=(hash searchedTerms=searchedTerms onChangeSearchedTermField=onChangeSearchedTermField) tagName=""}}
|
||||||
|
|
||||||
<div class="container advanced-search-posted-by-group">
|
<div class="container advanced-search-posted-by-group">
|
||||||
<div class="control-group pull-left">
|
<div class="control-group pull-left">
|
||||||
@ -162,4 +162,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{plugin-outlet name="advanced-search-options-below" args=(hash searchedTerms=searchedTerms) tagName=""}}
|
{{plugin-outlet name="advanced-search-options-below" args=(hash searchedTerms=searchedTerms onChangeSearchedTermField=onChangeSearchedTermField) tagName=""}}
|
||||||
|
Loading…
Reference in New Issue
Block a user