diff --git a/1.05-Drop-down-filter.md b/1.05-Drop-down-filter.md index 7feb4be..a4fcc0a 100644 --- a/1.05-Drop-down-filter.md +++ b/1.05-Drop-down-filter.md @@ -127,4 +127,78 @@ } + +## Events +

+Assuming TableFilter is already instanciated: +

+
+var tf = new TableFilter('my-table-id');
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EventDescriptionRemarksExample
before-populating-filterEvent emitted just before starting populating a filter + Subscribers receive the following parameters: +
    +
  • tf - current TableFilter instance
  • +
  • colIndex - index of the filter's column
  • +
+
+
+	tf.emitter.on(['before-populating-filter'], function(tf, colIndex){ 
+	  console.log(tf, colIndex);
+	});
+        
+
after-populating-filterEvent emitted when the filter is populated + Subscribers receive the following parameters: +
    +
  • tf - current TableFilter instance
  • +
  • colIndex - index of the filter's column
  • +
  • element - filter's DOM element
  • +
+
+
+	tf.emitter.on(['after-populating-filter'], function(tf, colIndex, element){ 
+	  console.log(tf, colIndex, element);
+	});
+        
+
filter-focusEvent emitted when a filter receives focus + Subscribers receive the following parameters: +
    +
  • tf - current TableFilter instance
  • +
  • element - filter's DOM element
  • +
+
+
+	tf.emitter.on(['filter-focus'], function(tf, element){ 
+	  console.log(tf, element);
+	});
+        
+
\ No newline at end of file