File tree Expand file tree Collapse file tree 2 files changed +28
-5
lines changed
frontend/express/public/javascripts/countly/vue/components Expand file tree Collapse file tree 2 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 7272 var currentArray = this . rows . slice ( ) ;
7373 if ( this . displaySearch && this . controlParams . searchQuery ) {
7474 var queryLc = ( this . controlParams . searchQuery + "" ) . toLowerCase ( ) ;
75+
76+ var searchableFields = [ ] ;
77+ if ( this . $refs . elTable && this . $refs . elTable . columns ) {
78+ this . $refs . elTable . columns . forEach ( function ( col ) {
79+ if ( col . columnKey ) {
80+ searchableFields . push ( col . columnKey ) ;
81+ }
82+ } ) ;
83+ }
84+
7585 currentArray = currentArray . filter ( function ( item ) {
76- return Object . keys ( item ) . some ( function ( fieldKey ) {
77- if ( item [ fieldKey ] === null || item [ fieldKey ] === undefined ) {
86+ // If no searchable fields found from columns, use original search logic
87+ if ( ! searchableFields . length ) {
88+ return Object . keys ( item ) . some ( function ( fieldKey ) {
89+ if ( item [ fieldKey ] === null || item [ fieldKey ] === undefined ) {
90+ return false ;
91+ }
92+ return ( item [ fieldKey ] + "" ) . toLowerCase ( ) . indexOf ( queryLc ) > - 1 ;
93+ } ) ;
94+ }
95+
96+ return searchableFields . some ( function ( fieldKey ) {
97+ var value = item [ fieldKey ] ;
98+ if ( value === null || value === undefined ) {
7899 return false ;
79100 }
80- return ( item [ fieldKey ] + "" ) . toLowerCase ( ) . indexOf ( queryLc ) > - 1 ;
101+ return ( value + "" ) . toLowerCase ( ) . indexOf ( queryLc ) > - 1 ;
81102 } ) ;
82103 } ) ;
83104 }
Original file line number Diff line number Diff line change 26162616 Vue . component ( "cly-chart-time" , BaseLineChart . extend ( {
26172617 data : function ( ) {
26182618 return {
2619- forwardedSlots : [ "chart-left" , "chart-right" ]
2619+ forwardedSlots : [ "chart-left" , "chart-right" ] ,
2620+ chartType : 'line'
26202621 } ;
26212622 } ,
26222623 props : {
27332734 else if ( ! this . areNotesHidden ) {
27342735 this . getGraphNotes ( ) ;
27352736 }
2737+ this . chartType = this . seriesOptions ?. type || 'line' ;
27362738 } ,
27372739 notesVisibility : function ( ) {
27382740 if ( ! this . areNotesHidden ) {
27452747 } ,
27462748 template : '<div class="cly-vue-chart" :class="chartClasses" :style="chartStyles">\
27472749 <div class="cly-vue-chart__echart bu-is-flex bu-is-flex-direction-column bu-is-flex-grow-1 bu-is-flex-shrink-1" style="min-height: 0">\
2748- <chart-header :test-id="testId + \'-header\'" ref="header" :category="this.category" :hide-notation="this.hideNotation" v-if="!isChartEmpty" @series-toggle="onSeriesChange" :show-zoom="showZoom" :show-toggle="showToggle" :show-download="showDownload" @graph-notes-refresh="refresh" @notes-visibility="notesVisibility">\
2750+ <chart-header :test-id="testId + \'-header\'" ref="header" :chart-type="this.chartType" : category="this.category" :hide-notation="this.hideNotation" v-if="!isChartEmpty" @series-toggle="onSeriesChange" :show-zoom="showZoom" :show-toggle="showToggle" :show-download="showDownload" @graph-notes-refresh="refresh" @notes-visibility="notesVisibility">\
27492751 <template v-for="item in forwardedSlots" v-slot:[item]="slotScope">\
27502752 <slot :name="item" v-bind="slotScope"></slot>\
27512753 </template>\
You can’t perform that action at this time.
0 commit comments