feat(pipes): support arguments in transform function
This commit is contained in:

committed by
vsavkin

parent
f0e962c55e
commit
600d53c68e
@ -304,6 +304,8 @@ class _CodegenState {
|
||||
|
||||
String _genPipeCheck(ProtoRecord r) {
|
||||
var context = _localNames[r.contextIndex];
|
||||
var argString = r.args.map((arg) => this._localNames[arg]).join(", ");
|
||||
|
||||
var oldValue = _fieldNames[r.selfIndex];
|
||||
var newValue = _localNames[r.selfIndex];
|
||||
var change = _changeNames[r.selfIndex];
|
||||
@ -322,7 +324,7 @@ class _CodegenState {
|
||||
$pipe = $_PIPE_REGISTRY_ACCESSOR.get('$pipeType', $context, $cdRef);
|
||||
}
|
||||
|
||||
$newValue = $pipe.transform($context);
|
||||
$newValue = $pipe.transform($context, [$argString]);
|
||||
if (!$_IDENTICAL_CHECK_FN($oldValue, $newValue)) {
|
||||
$newValue = $_UTIL.unwrapValue($newValue);
|
||||
$change = true;
|
||||
|
Reference in New Issue
Block a user