File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,19 @@ export default {
165165 }
166166 }
167167
168+ return result ;
169+ } ,
170+ // is sortable column
171+ isSortableCloumn ( ) {
172+ let result = false ;
173+
174+ const { sortColumns, groupColumnItem } = this ;
175+ const currentField = groupColumnItem . field ;
176+
177+ if ( Object . keys ( sortColumns ) . includes ( currentField ) ) {
178+ result = true ;
179+ }
180+
168181 return result ;
169182 } ,
170183 } ,
@@ -183,6 +196,7 @@ export default {
183196 [ clsName ( "first-right-fixed-column" ) ] :
184197 this . isfirstRightFixedColumn ,
185198 [ clsName ( "last-column" ) ] : this . isLastCloumn ,
199+ [ clsName ( "sortable-column" ) ] : this . isSortableCloumn ,
186200 } ;
187201
188202 const {
@@ -378,9 +392,6 @@ export default {
378392
379393 const props = {
380394 class : clsName ( "sort" ) ,
381- on : {
382- click : ( ) => this . sortChange ( ) ,
383- } ,
384395 } ;
385396
386397 result = (
@@ -592,6 +603,10 @@ export default {
592603 const events = {
593604 click : ( e ) => {
594605 this . cellClick ( e , click ) ;
606+
607+ if ( this . isSortableCloumn ) {
608+ this . sortChange ( ) ;
609+ }
595610 } ,
596611 dblclick : ( e ) => {
597612 this . cellDblclick ( e , dblclick ) ;
You can’t perform that action at this time.
0 commit comments