Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lib): add getInitialValue() function #16

Merged
merged 4 commits into from
Aug 3, 2020

Conversation

manudss
Copy link
Contributor

@manudss manudss commented Aug 3, 2020

To be able to obtain the initial value of the form.

Closes #15

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #15

What is the new behavior?

add a function to get the initial value of a form.

Does this PR introduce a breaking change?

[ ] Yes
[x ] No

README.md Outdated
@@ -353,6 +349,25 @@ export class SettingsComponent {
}
```

### Set and get Initial Value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can make it short and clear. Just write the two functions without the whole explanation around it.

Copy link
Contributor Author

@manudss manudss Aug 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

juste like this : ?

setInitialValue(name, value) - Set the Initial Value

formsManager.setInitialValue('form', initialValue);

getInitialValue(name) - Get the Initial Value or undefined if not exist.

formsManager.getInitialValue('form');

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@manudss manudss force-pushed the feature/#15-getinitialvalue branch from 6617776 to 4793d9f Compare August 3, 2020 14:31
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
manudss and others added 2 commits August 3, 2020 17:55
Co-authored-by: Netanel Basal <NetanelBasal@users.noreply.github.com>
Co-authored-by: Netanel Basal <NetanelBasal@users.noreply.github.com>
@NetanelBasal NetanelBasal merged commit 0a15799 into ngneat:master Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add getInitialValue() function to get the initial form value already stored in forms-manager
2 participants