Skip to content

Commit 732e4ff

Browse files
authored
Merge pull request #147 from edly-io/manan/EDLY-5669
Fixed coupon search functionality
2 parents 267d1ad + 5059c69 commit 732e4ff

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

ecommerce/static/js/views/coupon_list_view.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,15 @@ define([
8282

8383
if (!$.fn.dataTable.isDataTable('#couponTable')) {
8484
couponTable = this.$el.find('#couponTable').DataTable({
85-
serverSide: true,
8685
ajax: this.url,
8786
autoWidth: false,
8887
lengthMenu: [10, 25, 50, 100],
8988
info: true,
9089
paging: true,
9190
initComplete: function() {
9291
$('#couponTable_filter input').unbind()
93-
.bind('keyup', function(e) {
94-
// If the length is 3 or more characters, or the user pressed ENTER, search
95-
if (this.value.length >= 3 || e.keyCode === 13) {
96-
couponTable.search(this.value).draw();
97-
}
98-
99-
// Ensure we clear the search if they backspace far enough
100-
if (this.value === '') {
101-
couponTable.search('').draw();
102-
}
92+
.bind('keyup', function() {
93+
couponTable.search(this.value).draw();
10394
});
10495
},
10596
oLanguage: {

0 commit comments

Comments
 (0)