This repository was archived by the owner on Mar 21, 2025. It is now read-only.
Add the possibility to choose other events than just click #98
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This is a small contribution to be able to track via directives on other events than just the click.
Motivation
We got a form a bit complex, which has several fields.
We want to be able to determine the drop rate from inside the form to see if we are going in a wrong direction or if one specific form creates complexity for the user.
The rule to make it working is to track blur and/or focus events on the input fields.
Alternatives
We could have create a new method from inside our Vue component but we want to avoid any external behavior to be described from inside our component.
Directive are a much more efficient and clean way to achieve our tracking.
Choices made
To keep backwards compatibility and because it's the most obvious choice, we track by default on the click event.