ソースを参照

refs #1629, #1678: add sortStable option to documentation

zhixin 9 年 前
コミット
45cfb8ba7a

+ 9 - 2
docs/_i18n/en/documentation/table-options.md

@@ -70,6 +70,13 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
         <td>Defines the column sort order, can only be 'asc' or 'desc'.</td>
     </tr>
     <tr>
+        <td>sortStable</td>
+        <td>data-sort-stable</td>
+        <td>Boolean</td>
+        <td>false</td>
+        <td>True to get a stable sorting. We will add <code>_position</code> property to the row.</td>
+    </tr>
+    <tr>
         <td>iconsPrefix</td>
         <td>data-icons-prefix</td>
         <td>String</td>
@@ -569,7 +576,7 @@ function rowStyle(value, row, index) {
         Example usage:<br>
         <pre>
         function customSearch(text) {
-            //Search logic here. 
+            //Search logic here.
             //You must use `this.data` array in order to filter the data. NO use `this.options.data`.
         }
         </pre>
@@ -587,7 +594,7 @@ function rowStyle(value, row, index) {
         Example usage:<br>
         <pre>
         function customSort(sortName, sortOrder) {
-            //Sort logic here. 
+            //Sort logic here.
             //You must use `this.data` array in order to sort the data. NO use `this.options.data`.
         }
         </pre>

+ 9 - 2
docs/_i18n/es/documentation/table-options.md

@@ -70,6 +70,13 @@ Las opciones de la tabla están definidas en `jQuery.fn.bootstrapTable.defaults`
         <td>Define el método de ordenamiento, solo puede ser 'asc' o 'desc'.</td>
     </tr>
     <tr>
+        <td>sortStable</td>
+        <td>data-sort-stable</td>
+        <td>Boolean</td>
+        <td>false</td>
+        <td>True to get a stable sorting. We will add <code>_position</code> property to the row.</td>
+    </tr>
+    <tr>
         <td>iconsPrefix</td>
         <td>data-icons-prefix</td>
         <td>String</td>
@@ -498,7 +505,7 @@ Las opciones de la tabla están definidas en `jQuery.fn.bootstrapTable.defaults`
             Example usage:<br>
             <pre>
             function customSearch(text) {
-                //Search logic here. 
+                //Search logic here.
                 //You must use `this.data` array in order to filter the data. NO use `this.options.data`.
             }
             </pre>
@@ -516,7 +523,7 @@ Las opciones de la tabla están definidas en `jQuery.fn.bootstrapTable.defaults`
             Example usage:<br>
             <pre>
             function customSort(sortName, sortOrder) {
-                //Sort logic here. 
+                //Sort logic here.
                 //You must use `this.data` array in order to sort the data. NO use `this.options.data`.
             }
             </pre>

+ 9 - 2
docs/_i18n/zh-cn/documentation/table-options.md

@@ -70,6 +70,13 @@
         <td>定义排序方式 'asc' 或者 'desc'</td>
     </tr>
     <tr>
+        <td>sortStable</td>
+        <td>data-sort-stable</td>
+        <td>Boolean</td>
+        <td>false</td>
+        <td>设置为 <code>true</code> 将获得稳定的排序,我们会添加<code>_position</code>属性到 row 数据中。</td>
+    </tr>
+    <tr>
         <td>iconsPrefix</td>
         <td>data-icons-prefix</td>
         <td>String</td>
@@ -524,7 +531,7 @@
             Example usage:<br>
             <pre>
             function customSearch(text) {
-                //Search logic here. 
+                //Search logic here.
                 //You must use `this.data` array in order to filter the data. NO use `this.options.data`.
             }
             </pre>
@@ -542,7 +549,7 @@
             Example usage:<br>
             <pre>
             function customSort(sortName, sortOrder) {
-                //Sort logic here. 
+                //Sort logic here.
                 //You must use `this.data` array in order to sort the data. NO use `this.options.data`.
             }
             </pre>