Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.disable modifier not applying to some components #13

Open
Dylancyclone opened this issue Sep 19, 2022 · 0 comments
Open

.disable modifier not applying to some components #13

Dylancyclone opened this issue Sep 19, 2022 · 0 comments

Comments

@Dylancyclone
Copy link

First of all thank you for making this package, it has been a great help in organizing permissions.

I am using version 2.0.2

I've noticed that using the .disable modifier on a permission directive causes some components to not become disabled when that permission is not held. The component will still disappear with without the .disable modifier, as expected.

The expected behavior is that the the "disable" prop should be applied to the component when the given permission is not met and the .disable modifier is present.

The actual behavior is that not all components receive this prop, even though it is a valid prop that can be applied to the component.

A workaround I have found is to explicitly set "disable" or "disabled" prop using the helper function "$acl.role()", though looking at the code, that should be what the directive is doing anyways

if (disableModifier) {
el.disabled = true;

Is there something I am doing wrong?

Reproduction Link: https://codesandbox.io/s/modest-matsumoto-6ions3?file=/src/pages/Index.vue:2304-2345
chrome_BUwnPZPb9z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant