File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -67,11 +67,13 @@ export const DataDistributor = function () {
6767 refresh ( ) ;
6868 }
6969
70- function refresh ( ) {
70+ function refresh ( withoutObservers ?: boolean ) {
7171 if ( data === undefined ) {
7272 return ;
7373 }
74- notifyObservers ( ) ;
74+ if ( ! withoutObservers ) {
75+ notifyObservers ( ) ;
76+ }
7577
7678 let filter : FilterMethod = filters . reduce (
7779 function ( a : FilterMethod , filter ) {
Original file line number Diff line number Diff line change @@ -4,15 +4,17 @@ import { CanRender } from "../container.js";
44import { Filter } from "../datadistributor.js" ;
55
66export const HostnameFilter = function ( ) : CanRender & Filter {
7- let refreshFunctions : ( ( ) => any ) [ ] = [ ] ;
7+ let refreshFunctions : ( ( bool ? ) => any ) [ ] = [ ] ;
88 let timer : ReturnType < typeof setTimeout > ;
99 let input = document . createElement ( "input" ) ;
1010
1111 function refresh ( ) {
1212 clearTimeout ( timer ) ;
1313 timer = setTimeout ( function ( ) {
1414 refreshFunctions . forEach ( function ( f ) {
15- f ( ) ;
15+ // observer gui function recreates the filter this removes the input focus
16+ // the hostname filter should therefore not notifyObservers on refresh
17+ f ( true ) ;
1618 } ) ;
1719 } , 250 ) ;
1820 }
You can’t perform that action at this time.
0 commit comments