fix(ivy): directive matching not working in some cases when preceded by styling attributes (#31942)
Fixes Ivy's directive matching not capturing attribute selectors when there is one class binding, one style binding and a regular binding that precede the attribute that would match the directive. The issue appears to come from the fact that we weren't skipping over style bindings correctly which was throwing the loop off not to go into `bindingsMode` and to skip some of the bindings when matching. PR Close #31942
This commit is contained in:

committed by
Alex Rickabaugh

parent
3122f3415a
commit
a2183ddb7a
@ -198,7 +198,8 @@ function findAttrIndexInNode(
|
||||
} else if (
|
||||
maybeAttrName === AttributeMarker.Bindings || maybeAttrName === AttributeMarker.I18n) {
|
||||
bindingsMode = true;
|
||||
} else if (maybeAttrName === AttributeMarker.Classes) {
|
||||
} else if (
|
||||
maybeAttrName === AttributeMarker.Classes || maybeAttrName === AttributeMarker.Styles) {
|
||||
let value = attrs[++i];
|
||||
// We should skip classes here because we have a separate mechanism for
|
||||
// matching classes in projection mode.
|
||||
|
Reference in New Issue
Block a user