Browse Source

added documentation (detailFormatter and detailViewByClick)

Dustin Utecht 6 years ago
parent
commit
211f3e573d
2 changed files with 28 additions and 0 deletions
  1. 16 0
      site/docs/api/column-options.md
  2. 12 0
      site/docs/api/table-options.md

+ 16 - 0
site/docs/api/column-options.md

@@ -394,3 +394,19 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
   Set `true` to show the title of column with 'radio' or 'singleSelect' 'checkbox' option.
 
 - **Default:** `false`
+
+## detailFormatter
+
+- **Attribute:** `data-detail-formatter`
+
+- **Type:** `Function`
+
+- **Detail:**
+
+  Format your detail view when detailView and detailViewByClick is set to true. Return a String and it will be appended into the detail view cell, optionally render the element directly using the third parameter which is a jQuery element of the target cell.
+  
+  Fallback is the detail-formatter of the table.
+
+- **Default:** `function(index, row, element) { return '' }`
+
+- **Example:** [Detail View](https://examples.bootstrap-table.com/#options/detail-view.html)

+ 12 - 0
site/docs/api/table-options.md

@@ -1160,6 +1160,18 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
 
 - **Example:** [Detail Filter](https://examples.bootstrap-table.com/#options/detail-filter.html)
 
+## detailViewByClick
+
+- **Attribute:** `data-detail-view-by-click`
+
+- **Type:** `Boolean`
+
+- **Detail:**
+
+  Set `true` to toggle the detail view, when a cell is clicked.
+
+- **Example:** [Toggle detail view by click](https://examples.bootstrap-table.com/#options/detail-view-by-click.html)
+
 ## toolbar
 
 - **Attribute:** `data-toolbar`