1
0
mirror of https://github.com/2ec0b4/kaamelott-soundboard.git synced 2025-12-08 15:43:24 +00:00

(petosorus-random_button) Réinitialise également le filtre

This commit is contained in:
Antoine
2020-02-11 22:49:47 +01:00
parent 8c38fde4b2
commit a102c7b9e3

View File

@@ -20,6 +20,7 @@ define("views/filter", function(require) {
},
initialize: function() {
this.channel = Radio.channel("Sounds");
this.channel.on("sounds:reset", this.resetFilter.bind(this));
},
filterSounds: function(e) {
var value = this.$el.find(this.ui.searchField).val();
@@ -35,7 +36,9 @@ define("views/filter", function(require) {
this.channel.trigger("sounds:filter", value);
},
resetFilter: function(e) {
e.preventDefault();
if (e) {
e.preventDefault();
}
this.$el.find(this.ui.searchField).val('');
this.$el.find(this.ui.searchForm).submit();