Browse Source

Merge pull request #810 from tm1000/master

Fixes #808
文翼 10 years ago
parent
commit
d90bcb0912
2 changed files with 6 additions and 6 deletions
  1. 4 4
      docs/_i18n/en/documentation/methods.md
  2. 2 2
      src/bootstrap-table.js

+ 4 - 4
docs/_i18n/en/documentation/methods.md

@@ -85,15 +85,15 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
         <td>showRow</td>
         <td>params</td>
         <td>Show the specified row. the param contains following properties:
-        index: the row index or the idField.
-        isIdField: Boolean to indicates if index is the idField od the row or not.</td>
+        index: the row index or the uniqueId.
+        isIdField: Boolean to indicates if index is the uniqueId or the row or not.</td>
     </tr>
     <tr>
         <td>hideRow</td>
         <td>params</td>
         <td>Hide the specified row. the param contains following properties:
-        index: the row index or the idField.
-        isIdField: Boolean to indicates if index is the idField od the row or not.</td>
+        index: the row index or the uniqueId.
+        isIdField: Boolean to indicates if index is the uniqueId or the row or not.</td>
     </tr>
     <tr>
         <td>getRowsHidden</td>

+ 2 - 2
src/bootstrap-table.js

@@ -1201,7 +1201,7 @@
                 sprintf(' id="%s"', $.isArray(item) ? undefined : item._id),
                 sprintf(' class="%s"', style.classes || ($.isArray(item) ? undefined : item._class)),
                 sprintf(' data-index="%s"', i),
-                sprintf(' data-unique-id="%s"', item[this.options.uniqueId]),
+                sprintf(' data-uniqueid="%s"', item[this.options.uniqueId]),
                 sprintf('%s', data_),
                 '>'
             );
@@ -1663,7 +1663,7 @@
             return;
         }
 
-        $(this.$body[0]).children().filter(sprintf(isIdField ? '[data-unique-id="%s"]' : '[data-index="%s"]', index))
+        $(this.$body[0]).children().filter(sprintf(isIdField ? '[data-uniqueid="%s"]' : '[data-index="%s"]', index))
             [visible ? 'show' : 'hide']();
     };