mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-03 20:20:03 +00:00
Hide widget values when computedDisabled is true (#1109)
This commit is contained in:
@@ -142,7 +142,7 @@ export abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget> impl
|
||||
|
||||
// TODO: Resolve this workaround. Ref: https://github.com/Comfy-Org/litegraph.js/issues/1022
|
||||
get _displayValue(): string {
|
||||
return String(this.value)
|
||||
return this.computedDisabled ? "" : String(this.value)
|
||||
}
|
||||
|
||||
get labelBaseline() {
|
||||
|
||||
@@ -23,6 +23,7 @@ export class ComboWidget extends BaseSteppedWidget<IStringComboWidget | IComboWi
|
||||
override type = "combo" as const
|
||||
|
||||
override get _displayValue() {
|
||||
if (this.computedDisabled) return ""
|
||||
const { values: rawValues } = this.options
|
||||
if (rawValues) {
|
||||
const values = typeof rawValues === "function" ? rawValues() : rawValues
|
||||
|
||||
@@ -9,6 +9,7 @@ export class NumberWidget extends BaseSteppedWidget<INumericWidget> implements I
|
||||
override type = "number" as const
|
||||
|
||||
override get _displayValue() {
|
||||
if (this.computedDisabled) return ""
|
||||
return Number(this.value).toFixed(
|
||||
this.options.precision !== undefined
|
||||
? this.options.precision
|
||||
|
||||
Reference in New Issue
Block a user