-
Notifications
You must be signed in to change notification settings - Fork 403
feat(formly-form): Use arrays for fieldTransforms #461
Conversation
I might add some more tests when I get time Another thought I had was specifying fieldTransforms as a keyed object, that way you can have specific transforms applied to different fields... formConfig.extras.fieldTransforms = {
transformOne: () => { },
transformTwo: () => { },
};
...
fields = [{
name: 'one',
fieldTransforms: ['transformOne']
}, {
name: 'two',
fieldTransforms: ['transformTwo']
}] |
Thanks for this. Can't merge now, but will look more closely later. The problem with object is order isn't consistent/garunteed... Though I like the idea, I think we'll wait for someone to have aause case before we implement something like that. Thanks again! I'll look at this later. In the mean time, could I ask for your feedback on ease of contributing? |
setupModels(); | ||
|
||
angular.forEach($scope.fields, attachKey); // attaches a key based on the index if a key isn't specified | ||
angular.forEach($scope.fields, setupWatchers); // setup watchers for all fields | ||
} | ||
|
||
function warn() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason you didn't just inject the formlyWarn
service and use that instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason, just didn't see it there. Will switch it out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's impressive that you created almost exactly what I had. Haha, I thought it was copy/paste code 😀
Odd... Travis says that the build passed, but if I look at the output, it shows that two tests failed... |
Hmm... I do have ghooks disabled (on Windows). Will look at it later. I'm in no hurry to get this merged, just happy to contribute |
I'm happy to have you contribute! Looks like they're failing locally. I'll try to see what's going on. I'll let you know. Thanks for contributing :-) |
I've found the problem. I'll submit a PR to your branch :-) |
Documentation and deprecation warnings for both options and formConfig.extras Fixes #458
Perfect! Thank you! |
Thanks for the assistance! I'll try some feedback... I find structure really helpful, code style, contribution guidelines, have always been helpful when I've contributed to projects in the past. Since using formly and seeing first-timers-only gain momentum, it's only recently I've realised how helpful these ideas are for the community. Using ghooks to run linting, tests, etc is really helpful. Saves all the nitpicking 'why did you add that tab/space/symbol/emoji'. Super beneficial. The downside is making it work in everyone's dev environment/setup. How can we improve that experience for people, especially when the node/npm world is so modular and projects have so many dependencies, for example commitizen/cz-cli#10. How much hand-holding should there be? I think it's enough to reply to people's queries with a quick link or short description of where to find the solution. From what I've seen in Gitter, you do a good job. From this side of the world it looks like you're making good things. Look after yourself |
:-D thanks for the feedback! I'm glad that overall it was a good
(Sent from my mobile device, please forgive typos or brevity)
|
Documentation and deprecation warnings for both options and formConfig.extras
Fixes #458