start grid
This commit is contained in:
@ -97,8 +97,7 @@ class Dropdown {
|
||||
onselected;
|
||||
onexpanded;
|
||||
|
||||
constructor(options) {
|
||||
options ??= {};
|
||||
constructor(options = {}) {
|
||||
options.searchplaceholder ??= r('searchHolder', 'Search...');
|
||||
options.textkey ??= 'text';
|
||||
options.valuekey ??= 'value';
|
||||
@ -287,8 +286,7 @@ class Dropdown {
|
||||
|
||||
get #expanded() { return this.#container?.style.visibility === 'visible' }
|
||||
|
||||
#dropdown(flag) {
|
||||
flag ??= true;
|
||||
#dropdown(flag = true) {
|
||||
const options = this.#options;
|
||||
const textkey = options.textkey;
|
||||
let panel = this.#container;
|
||||
@ -472,8 +470,7 @@ class Dropdown {
|
||||
}
|
||||
}
|
||||
|
||||
static resolve(dom) {
|
||||
dom ??= document.body;
|
||||
static resolve(dom = document.body) {
|
||||
const selects = dom.querySelectorAll('select');
|
||||
for (let sel of selects) {
|
||||
const source = [...sel.children].map(it => {
|
||||
|
Reference in New Issue
Block a user