File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -355,9 +355,16 @@ let SheetView = widgets.DOMWidgetView.extend({
355
355
manualRowResize : this . model . get ( 'row_resizing' )
356
356
} ;
357
357
} ,
358
- _search : function ( ) {
359
- let res = this . hot . getPlugin ( 'search' ) . query ( this . model . get ( 'search_token' ) ) ;
360
- this . hot . render ( ) ;
358
+ _search : function ( render = true , ignore_empty_string = false ) {
359
+ let token = this . model . get ( 'search_token' ) ;
360
+ if ( ignore_empty_string && token == '' ) {
361
+ return ;
362
+ }
363
+
364
+ let res = this . hot . getPlugin ( 'search' ) . query ( token ) ;
365
+ if ( render ) {
366
+ this . hot . render ( ) ;
367
+ }
361
368
} ,
362
369
_get_cell_data : function ( ) {
363
370
return extract2d ( this . model . data , 'value' ) ;
@@ -441,6 +448,7 @@ let SheetView = widgets.DOMWidgetView.extend({
441
448
colHeaders : this . model . get ( 'column_headers' ) ,
442
449
rowHeaders : this . model . get ( 'row_headers' )
443
450
} ) ;
451
+ this . _search ( false , true ) ;
444
452
this . hot . render ( ) ;
445
453
resolve ( )
446
454
} )
You can’t perform that action at this time.
0 commit comments