updates
This commit is contained in:
@@ -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)) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user