allow select widget class to update if it uses a filter and is output changes (#6987)

* allow select widget class to update if it uses a filter and the filter output changes

* rewrite code to be more idiomatic + updates local property
This commit is contained in:
Maurycy Zarzycki 2022-10-15 13:26:21 +02:00 committed by GitHub
parent 6f98edd6bd
commit cfd894e6fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -175,6 +175,11 @@ SelectWidget.prototype.refresh = function(changedTiddlers) {
return true;
// If the target tiddler value has changed, just update setting and refresh the children
} else {
if(changedAttributes.class) {
this.selectClass = this.getAttribute("class");
this.getSelectDomNode().setAttribute("class",this.selectClass);
}
var childrenRefreshed = this.refreshChildren(changedTiddlers);
if(changedTiddlers[this.selectTitle] || childrenRefreshed) {
this.setSelectValue();