timdeschryver / ng-signal-forms

120 stars 9 forks source link

refactor: rework reference #5

Closed timdeschryver closed 1 year ago

timdeschryver commented 1 year ago

Remove the need of reference. What do you think @goetzrobin ? It needs some type reworks, but this was just another test... 😅

This doesn't support getting access to your own form field (as with the password @@ validation). To allow that we can rework this to the following signature:

password: createFormField('', (myValue) => {
  return { disable: () => myValue() === '' }
}),
goetzrobin commented 1 year ago

Same goes for the createFormField approach 🚀🚀

goetzrobin commented 1 year ago

Had some downtime today and played around with the approach you suggested.

password: createFormField('', (myValue) => {
  return { disable: () => myValue() === '' }
}),

I opened a PR with a possible implementation #6

github-actions[bot] commented 1 year ago

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

The release is available on:

Your semantic-release bot :package::rocket: