Benjamin Beinder

Results 7 comments of Benjamin Beinder

@gcorchon You can work around this by using RxJS: ```ts export class CurrencyInput implements FormValueControl { value = model(0); inputValue = toSignal(toObservable(this.value).pipe( filter(value => value !== this.outputValue) )); private outputValue:...

@leonsenft While it is true that you can do that, it does not solve the underlying problem. If you emit a value via `valueChange.emit()` the input signal gets updated and...

@leonsenft Both examples are essentially the one from the docs which does not work. They would only work if the user is prevented from putting anything other than the correct...

@leonsenft Yes, if the inputs were separated it would behave the same. Thank you for the detailed explanation, I see that I missed this in your [second example](https://github.com/angular/angular/issues/65478#issuecomment-3614996121) > Better...

The recomputation is triggered by `producerUpdateValueVersion` when setting the signal: https://github.com/angular/angular/blob/16364514e3f9d99ebf304e19c9f5b61b0304dd3f/packages/core/primitives/signals/src/linked_signal.ts#L105-L109 But this is probably by design, since it needs to recompute in order to track potential new signal dependencies...

No parse-format round trip without RxJS by misusing `equal` of `computed`: ``` ts @Component({ selector: 'currency-input', template: ` `, }) export class CurrencyInput implements FormValueControl { readonly value = model(0);...

I would include continuous value transformation in the docs since it is a very common use case in my opinion. This is the cleanest solution I could come up with:...