File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 26
26
- [ enh] Improved reorder-columns extension.
27
27
- [ enh] Added multiple-search, accent-neutralise extension.
28
28
- [ enh] Added fixed-columns extension.
29
+ - [ enh] Added ` $.fn.bootstrapTable.utils ` tools.
30
+ - [ enh] Added ` expandRow ` and ` collapseRow ` methods.
29
31
30
32
### 1.8.1
31
33
Original file line number Diff line number Diff line change 2478
2478
this . onSearch ( { currentTarget : $search } ) ;
2479
2479
} ;
2480
2480
2481
+ BootstrapTable . prototype . expandRow = function ( index ) {
2482
+ var $tr = this . $body . find ( sprintf ( '> tr[data-index="%s"]' , index ) ) ;
2483
+ if ( ! $tr . next ( ) . is ( 'tr.detail-view' ) ) {
2484
+ $tr . find ( '> td > .detail-icon' ) . click ( ) ;
2485
+ }
2486
+ } ;
2487
+
2488
+ BootstrapTable . prototype . collapseRow = function ( index ) {
2489
+ var $tr = this . $body . find ( sprintf ( '> tr[data-index="%s"]' , index ) ) ;
2490
+ if ( $tr . next ( ) . is ( 'tr.detail-view' ) ) {
2491
+ $tr . find ( '> td > .detail-icon' ) . click ( ) ;
2492
+ }
2493
+ } ;
2494
+
2481
2495
// BOOTSTRAP TABLE PLUGIN DEFINITION
2482
2496
// =======================
2483
2497
2504
2518
'togglePagination' ,
2505
2519
'toggleView' ,
2506
2520
'refreshOptions' ,
2507
- 'resetSearch'
2521
+ 'resetSearch' ,
2522
+ 'expandRow' , 'collapseRow'
2508
2523
] ;
2509
2524
2510
2525
$ . fn . bootstrapTable = function ( option ) {
You can’t perform that action at this time.
0 commit comments