This commit is contained in:
2025-12-02 21:56:36 +02:00
parent 718beee739
commit 82272f2090
2 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { Ut } from "."; import { Ut } from "./Ut";
export class AppendOptions { export class AppendOptions {
@@ -9,7 +9,7 @@ export class AppendOptions {
if (opts.clear) { if (opts.clear) {
this.replaceChildren(); this.replaceChildren();
} }
Ut.each(Ut.isStr(data) ? JSON.parse(data) : data, (val, id) => target.append(new Option(val, id)) ); Ut.each(Ut.isStr(data) ? JSON.parse(data) : data, (val, id) => target.append(new Option(val, id)) );
} }
} }
+5 -3
View File
@@ -145,9 +145,11 @@ export class Popup {
*/ */
setTitle(text) { setTitle(text) {
let title = this.card.toolbar.dxFind('h2.title'); const title = this.card?.toolbar?.dxFind('h2.title');
title.textContent = text; if (!title) return;
title.append(text);
title.classList.remove('hide'); title.classList.remove('hide');
} }
@@ -158,7 +160,7 @@ export class Popup {
if (this.opts.scrollBar) { if (this.opts.scrollBar) {
this.card.container.dxCss('max-height', this.card.container.dxCss('max-height',
( window.innerHeight - this.card.toolbar.clientHeight - this.opts.marginTop - this.opts.marginBottom ) ( window.innerHeight - (this.card?.toolbar?.clientHeight || 0) - this.opts.marginTop - this.opts.marginBottom )
+ 'px' + 'px'
); );
} }