Fix search letter cannot be disabled

This commit is contained in:
nathan 2022-08-17 16:26:22 -06:00
parent dce4ac78fc
commit 24d9d3ef53
2 changed files with 32 additions and 23 deletions

View File

@ -270,6 +270,15 @@ export class Et2ColumnSelection extends Et2InputWidget(LitElement)
}
}
});
// Add in letters
this.shadowRoot.querySelectorAll("[part='columns'] > :not(.column)").forEach((i : SlMenuItem) =>
{
if(i.checked)
{
value.push(i.value);
}
})
return value;
}

View File

@ -1978,35 +1978,35 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
if(col.caption && col.visibility !== et2_dataview_column.ET2_COL_VISIBILITY_ALWAYS_NOSELECT &&
col.visibility !== et2_dataview_column.ET2_COL_VISIBILITY_DISABLED)
{
visibility[col.id] = {visible: false};
}
visibility[col.id] = {visible: false};
}
}
const value = selectPopup.value;
// Update & remove letter filter
if(self.header.lettersearch)
// Update & remove letter filter
if(self.header.lettersearch)
{
var show_letters = true;
if(value.indexOf(LETTERS) >= 0)
{
var show_letters = true;
if(value.indexOf(LETTERS) >= 0)
{
value.splice(value.indexOf(LETTERS), 1);
}
else
{
show_letters = false;
}
self._set_lettersearch(show_letters);
value.splice(value.indexOf(LETTERS), 1);
}
self.sortedColumnsList = [];
for(var i = 0; i < value.length; i++)
else
{
// Handle skipped columns
let column = 0;
while(value[i] != "col_" + column && column < columnMgr.columns.length)
{
column++;
}
if(visibility[value[i]])
show_letters = false;
}
self._set_lettersearch(show_letters);
}
self.sortedColumnsList = [];
for(var i = 0; i < value.length; i++)
{
// Handle skipped columns
let column = 0;
while(value[i] != "col_" + column && column < columnMgr.columns.length)
{
column++;
}
if(visibility[value[i]])
{
visibility[value[i]].visible = true;
}