-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
return false inside "beforeAdd" function does not change indicator to red #37
Comments
Hi Team ,, any luck to help in this issue |
Hi @digitalsailweb ! Are you passing the <template>
<flowy
class="q-mx-auto"
:nodes="nodes"
:beforeAdd="beforeAdd"
/>
</template>
<script>
export default {
methods: {
beforeAdd({ to, from }) {
return false
}
}
}
</script> |
Hi @KjetilHaaheim
|
Aah, my apologies @digitalsailweb, I misinterpreted your question. To flag red, you need to use the If you have a quick peek in // FlowyNode.vue - methods
onEnterDrag(_event) {
this.hoveringWithDrag = true;
this.dropAllowed = this.beforeMove(_event.to);
} The answer could have been much shorter, but its fun to peek on the inside 👯 |
@KjetilHaaheim I am not sure if my understanding is correct or not of how flowy works. |
anyone has an idea for this issue. thanks |
Hi @digitalsailweb! I think I finally understood the issue, my apologies for complicating it. Your understanding is absolutely correct, the code which controls the drop indicator on hover, is the code I posted above. onEnterDrag(_event) {
this.hoveringWithDrag = true;
this.dropAllowed = this.beforeMove(_event.to);
} As you can see, it only uses the |
thanks for you reply and effort . any update to add the feature you mentioned ? thanks again |
Stuck in a similar issue. The link for the same: #62 |
Thanks for this great tool. I have issue which I want to change indicator color to red if dragged node does not match certain condition. For testing purpose I just return false inside "beforeAdd" function to see if indicator change to red but it does not change it is still blue.. Is there anything wrong here or I am missing something. As per comments inside the function , the function will change the indicator to red if you return false.
The text was updated successfully, but these errors were encountered: