Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit d4b0fd8

Browse files
committed
Merge pull request #1646 from OpenBazaar/improveStoreSearch
Improve store search
2 parents a902900 + e8f11e4 commit d4b0fd8

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

css/obBase.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6240,6 +6240,14 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
62406240
display: none;
62416241
}
62426242

6243+
#ov1.notFancy .user-page-header-slim {
6244+
display: none;
6245+
}
6246+
6247+
#ov1.notFancy .user-page-header-slim.scrolledIntoView {
6248+
display: block;
6249+
}
6250+
62436251
#ov1.notFancy .disabled,
62446252
#ov1.notFancy #userPage .disabled,
62456253
#ov1.notFancy #obContainer .disabled,

js/views/itemListVw.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module.exports = baseVw.extend({
3737
} else {
3838
self.renderNoneFound();
3939
}
40+
this.trigger("rendered");
4041
},
4142

4243
renderContract: function(item){

js/views/userPageVw.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,7 @@ UserPageVw = pageVw.extend({
813813
},
814814

815815
renderItems: function (model, skipNSFWmodal) {
816+
console.log("render")
816817
var self = this,
817818
select = this.$el.find('.js-categories'),
818819
selectOptions = [],
@@ -871,9 +872,11 @@ UserPageVw = pageVw.extend({
871872

872873
this.$('.js-listingCount').html(model.length);
873874

874-
if (model.length) {
875+
this.listenTo(this.itemList, 'rendered', ()=>{
875876
this.storeSearch = new window.List('searchStore', {valueNames: ['js-searchTitle'], page: 1000});
876-
}
877+
var searchTerms = this.$('#inputStore').val();
878+
searchTerms && this.storeSearch.search(searchTerms);
879+
});
877880
},
878881

879882
renderReviews: function (model) {

0 commit comments

Comments
 (0)