mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-07 05:38:27 +02:00
Fix bugs with Clarity boost select box
This commit is contained in:
@@ -82,6 +82,9 @@ export class BxSelectElement {
|
||||
$label.textContent = content;
|
||||
}
|
||||
|
||||
// Add line-through on disabled option
|
||||
$label.classList.toggle('bx-line-through', $option && $option.disabled);
|
||||
|
||||
// Hide checkbox when the selection is empty
|
||||
if (isMultiple) {
|
||||
$checkBox.checked = $option?.selected || false;
|
||||
@@ -123,13 +126,16 @@ export class BxSelectElement {
|
||||
|
||||
const observer = new MutationObserver((mutationList, observer) => {
|
||||
mutationList.forEach(mutation => {
|
||||
mutation.type === 'childList' && render();
|
||||
if (mutation.type === 'childList' || mutation.type === 'attributes') {
|
||||
render();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
observer.observe($select, {
|
||||
subtree: true,
|
||||
childList: true,
|
||||
attributes: true,
|
||||
});
|
||||
|
||||
render();
|
||||
|
Reference in New Issue
Block a user