terrier-engine 4.4.9 → 4.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -280,13 +280,19 @@ class SelectColumnsDropdown extends Dropdown<{modelDef: ModelDef, callback: Sele
|
|
|
280
280
|
checked: Set<string> = new Set()
|
|
281
281
|
columns!: string[]
|
|
282
282
|
|
|
283
|
+
get autoClose(): boolean {
|
|
284
|
+
return true
|
|
285
|
+
}
|
|
286
|
+
|
|
283
287
|
async init() {
|
|
288
|
+
await super.init()
|
|
289
|
+
|
|
284
290
|
this.columns = Object.keys(this.state.modelDef.columns).sort()
|
|
285
291
|
|
|
286
292
|
this.onClick(checkAllKey, _ => {
|
|
287
293
|
// toggle them all being checked
|
|
288
|
-
|
|
289
|
-
if (
|
|
294
|
+
log.info(`${this.checked.size} of ${this.columns.length} checked`)
|
|
295
|
+
if (this.checked.size > this.columns.length / 2) {
|
|
290
296
|
this.checked = new Set()
|
|
291
297
|
}
|
|
292
298
|
else {
|
|
@@ -321,7 +327,7 @@ class SelectColumnsDropdown extends Dropdown<{modelDef: ModelDef, callback: Sele
|
|
|
321
327
|
}
|
|
322
328
|
|
|
323
329
|
renderContent(parent: PartTag) {
|
|
324
|
-
parent.a(a => {
|
|
330
|
+
parent.a('.header', a => {
|
|
325
331
|
a.i('.glyp-check_all')
|
|
326
332
|
a.span({text: "Toggle All"})
|
|
327
333
|
}).emitClick(checkAllKey)
|