Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Support negation operator in selectors #232

Conversation

SantosGuillamot
Copy link
Contributor

Right now, it seems that the negation operator when using selectors doesn't work as expected. So using data-wp-bind.hidden="!selectors.show" doesn't work. If I am not mistaken, it is because we are not considering the option that it can be a function. Because of that, I moved the hasNegationOperator logic to the getEvaluate function.

Apart from that, I included a couple of basic tests to ensure it works in both cases.

Let me know if this is the correct approach or if we should do something different.

Copy link
Member

@luisherranz luisherranz left a comment

Choose a reason for hiding this comment

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

Looks perfect to me! 🎉

@SantosGuillamot SantosGuillamot merged commit 6f48257 into main-wp-directives-plugin May 18, 2023
@SantosGuillamot SantosGuillamot deleted the support-negation-operator-in-selectors branch May 18, 2023 10:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants