@@ -100,6 +100,7 @@ function save_collection(event): Promise<void | undefined> {
100100class LmodWidget extends Widget {
101101 protected loadedUList : HTMLUListElement ;
102102 protected availUList : HTMLUListElement ;
103+ protected availHeader : HTMLHeadingElement ;
103104 protected searchInput : HTMLInputElement ;
104105 protected searchSource : Array < string > ;
105106
@@ -118,7 +119,7 @@ class LmodWidget extends Widget {
118119 search_div_wrapper . setAttribute ( 'class' , 'jp-Lmod-search-wrapper' ) ;
119120 this . searchInput . setAttribute ( 'id' , 'modules' ) ;
120121 this . searchInput . setAttribute ( 'class' , 'jp-Lmod-input' ) ;
121- this . searchInput . setAttribute ( 'placeholder' , 'Search available modules...' )
122+ this . searchInput . setAttribute ( 'placeholder' , 'Filter available modules...' )
122123 search_div . appendChild ( search_div_wrapper ) ;
123124 search_div_wrapper . appendChild ( this . searchInput ) ;
124125 this . node . insertAdjacentElement ( 'afterbegin' , search_div ) ;
@@ -149,17 +150,19 @@ class LmodWidget extends Widget {
149150 </div>
150151 </div>
151152 <div class="jp-Lmod-section">
152- <div class="jp-Lmod-sectionHeader" id="avail_header"><H2>Available Modules</H2>
153+ <div class="jp-Lmod-sectionHeader">
154+ <h2 id="lmod_avail_header">Available Modules</h2>
153155 </div>
154156 <div class="jp-Lmod-sectionContainer">
155- <ul class="jp-Lmod-sectionList" id="lmod_avail_list">
156- </ul>
157+ <ul class="jp-Lmod-sectionList" id="lmod_avail_list">
158+ </ul>
157159 </div>
158160 </div>
159161 </div>` ) ;
160162
161163 this . loadedUList = this . node . querySelector ( '#lmod_loaded_list' ) ;
162164 this . availUList = this . node . querySelector ( '#lmod_avail_list' ) ;
165+ this . availHeader = this . node . querySelector ( '#lmod_avail_header' ) ;
163166
164167 this . loadedUList . addEventListener ( 'click' , this . onClickModuleList . bind ( this ) ) ;
165168 this . availUList . addEventListener ( 'click' , this . onClickModuleList . bind ( this ) ) ;
@@ -215,6 +218,7 @@ class LmodWidget extends Widget {
215218
216219 const html_list = result . map ( item => createModuleItem ( item , 'Load' ) ) ;
217220 this . availUList . append ( ...html_list ) ;
221+ this . availHeader . innerText = `Available Modules (${ result . length } )` ;
218222 }
219223
220224 protected restore ( event ) : Promise < void | undefined > {
0 commit comments