timdeschryver / ng-signal-forms

105 stars 7 forks source link

fix: change signal input modifier to accept whole value signal instea… #19

Closed goetzrobin closed 9 months ago

goetzrobin commented 9 months ago

…d of set function

BREAKING CHANGE: we replace the registerOnSet function of the SignalInputModifier with a new registerValueSignal function. We do this, because just assigning the set function to a new property within our class can break (and did break) due to it changing the scope from where set is called. Specifically, we are not calling ourSignal.set anymore this is ourSignal, but instead SignalInputDebounceDirective.set where this is now SignalInputDebounceDirective. To fix this we simply store the whole signal containing the value of our input and call the valueSignal.set in the debounce directive. To enable this our SignalInputModifier interface changes from registerOnSet to registerValueSignal.

goetzrobin commented 9 months ago

@timdeschryver does this look good? Will semver take care of the breaking change?

timdeschryver commented 9 months ago

@goetzrobin yea, semver will take care of it. But I kinda want to keep it as v1 until signals are stable. WDYT?

goetzrobin commented 9 months ago

I agree. I think it's also a niche API that is only used internally right now, so I think it doesn't really warrant a new major version IMO

github-actions[bot] commented 9 months ago

:tada: This PR is included in version 1.3.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: