Browse Source

Fix #750 Add/Update row shows hidden rows ?!

Dennis Hernández 10 years ago
parent
commit
b0f429a724
2 changed files with 3 additions and 3 deletions
  1. 2 2
      docs/_i18n/en/documentation/methods.md
  2. 1 1
      src/bootstrap-table.js

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

@@ -80,14 +80,14 @@ 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 idenx or the idField.
+        index: the row index or the idField.
         isIdField: Boolean to indicates if index is the idField od 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 idenx or the idField.
+        index: the row index or the idField.
         isIdField: Boolean to indicates if index is the idField od the row or not.</td>
     </tr>
     <tr>

+ 1 - 1
src/bootstrap-table.js

@@ -1633,7 +1633,7 @@
             return;
         }
 
-        $(this.$body[0]).children().filter(sprintf(isIdField ? '[value="%s"]' : '[data-index="%s"]', index))
+        $(this.$body[0]).children().filter(sprintf(isIdField ? '[data-unique-id="%s"]' : '[data-index="%s"]', index))
             [visible ? 'show' : 'hide']();
     };