File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ Bootstrap table displays data in a tabular format and offers rich support to rad
2828- [x] Fix #135 , #142 : Search use formatted data.
2929- [x] Verify search text before send queryParams.
3030- [x] Fix #148 : column events support namespace.
31+ - [x] Support to disable radio or checkbox column by formatter.
3132
3233## Features
3334
Original file line number Diff line number Diff line change 871871 sprintf ( ' name="%s"' , that . options . selectItemName ) +
872872 sprintf ( ' type="%s"' , type ) +
873873 sprintf ( ' value="%s"' , item [ that . options . idField ] ) +
874- sprintf ( ' checked="%s"' , value ? 'checked' : undefined ) +
875- sprintf ( ' %s' , that . options . columns [ j ] . checkboxEnabled ? undefined : 'disabled' ) +
874+ sprintf ( ' checked="%s"' , + value === 1 ||
875+ ( value && value . checked ) ? 'checked' : undefined ) +
876+ sprintf ( ' disabled="%s"' , ! that . options . columns [ j ] . checkboxEnabled ||
877+ ( value && value . disabled ) ? 'disabled' : undefined ) +
876878 ' />' ,
877879 '</td>' ] . join ( '' ) ;
878880 } else {
937939 $ ( this ) . prop ( 'checked' , true ) ;
938940 }
939941
940- var checkAll = that . $selectItem . length === that . $selectItem . filter ( ':checked' ) . length ,
942+ var checkAll = that . $selectItem . filter ( ':enabled' ) . length ===
943+ that . $selectItem . filter ( ':enabled' ) . filter ( ':checked' ) . length ,
941944 checked = $ ( this ) . prop ( 'checked' ) ,
942945 row = that . data [ $ ( this ) . data ( 'index' ) ] ;
943946
You can’t perform that action at this time.
0 commit comments