(part) => {
part.setValue(render2());
part.commit();
component.listenGP("globalPropChange", (prop) => {
if (prop === key) {
part.setValue(render2());
part.commit();
}
});
}
(part) => {
part.setValue(render2());
part.commit();
component.listenGP("globalPropChange", (prop) => {
if (prop === key) {
part.setValue(render2());
part.commit();
}
});
}
(part) => {
let changedValueSet = false;
const initialValue = getInitialValue();
if (initialValue instanceof Promise) {
initialValue.then((value) => {
if (changedValueSet)
return;
part.setValue(value);
part.commit();
});
if (placeholder) {
part.setValue(placeholder);
}
} else {
part.setValue(initialValue);
part.commit();
}
onChange((newValue) => {
changedValueSet = true;
if (newValue instanceof Promise) {
newValue.then((resolved) => {
part.setValue(resolved);
part.commit();
});
} else {
part.setValue(newValue);
part.commit();
}
});
}