Browse Source

Update onSearch docs and example.

zhixin 11 years ago
parent
commit
25ffa05edf
3 changed files with 13 additions and 1 deletions
  1. 2 1
      README.md
  2. 6 0
      docs/docs.js
  3. 5 0
      docs/examples.html

+ 2 - 1
README.md

@@ -22,7 +22,8 @@ Bootstrap table displays data in a tabular format and offers rich support to rad
 
 - [x] Fix #119, #123: Save all `id` and `class` of `tr` and `td` for html table.
 - [x] Fix #149: Hide empty data on Card view.
-- [x] Fix #131: Add pagination events.
+- [x] Fix #131: Add `onPageChange` event.
+- [x] Add `onSearch` event.
 - [ ] Fix #144: `onCheck` and `onUncheck` method are reversed when using `clickToSelect` option. (jQuery 1.7.2 bug).
 - [x] Apply `width` column option to row style.
 - [x] Add bootstrap-table-filter extension.

+ 6 - 0
docs/docs.js

@@ -688,6 +688,12 @@ $(function () {
                     event: 'page-change.bs.table',
                     parameter: 'number, size',
                     description: 'Fires when change the page number or page size.'
+                },
+                {
+                    name: 'onSearch',
+                    event: 'search.bs.table',
+                    parameter: 'text',
+                    description: 'Fires when search the table.'
                 }
             ]
         });

+ 5 - 0
docs/examples.html

@@ -862,6 +862,9 @@
                                     },
                                     onPageChange: function (number, size) {
                                         $result.text('Event: onPageChange, data: ' + number + ', ' + size);
+                                    },
+                                    onSearch: function (text) {
+                                        $result.text('Event: onSearch, data: ' + text);
                                     }
                                     */
                                 }).on('all.bs.table', function (e, name, args) {
@@ -889,6 +892,8 @@
                                         field + ', ' + checked);
                                 }).on('page-change.bs.table', function (e, size, number) {
                                     $result.text('Event: page-change.bs.table, data: ' + number + ', ' + size);
+                                }).on('search.bs.table', function (e, text) {
+                                    $result.text('Event: search.bs.table, data: ' + text);
                                 });
                             });
                         });