Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Make fieldTransform an array. #458

Closed
@kentcdodds

Description

@kentcdodds

This would make it possible to have multiple fieldTransforms.

This could be implemented as a non-breaking change by making this capable of handling a function or an array of functions:

if (fieldTransform) {
$scope.fields = fieldTransform($scope.fields, $scope.model, $scope.options, $scope.form);
if (!$scope.fields) {
throw formlyUsability.getFormlyError('fieldTransform must return an array of fields');
}
}

We'd want to log a deprecation warning, add error/warning docs, and test that (like we've done before, implementation | warning docs | test).

Then in a breaking release we could remove that logic and require it to be an array.

This one's up for grabs (whether you've contributed to open source before or not!)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions