You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To maintain state in an element of a list, one can use v-bind:key, as explained here. This makes creating a todo-list while keeping the local state intact (selections, focus, input text, other things the browser / included plugins deal with for us) trivial.
However, if I happen to want more than a todo-list, like, a Kanban Board, and I want to be able to move elements across columns, well, it does not work any more.
There are some hacks that could work for this particular case (having the Kanban board be a single array, that simply looks like a Kanban board through bad CSS tricks). But they are bad, and can not be extended to more complex situations (like, a recursive todo-list, the kind that you can find on Workflowy, Dynalist, Notion, etc.).
What does the proposed API look like?
How I could see it work is with a global-key attribute on vue elements. It would act exactly like key in v-for, but globally.
The text was updated successfully, but these errors were encountered:
I'm not sure to grasp how global-key would work since it's precisely supposed to be local to an element/component. Overall, the information here is not enough to understand the feature request and it makes me understand you need guidance in implementing a board more than anything else. For the purpose, please use the forum, the Discord server or StackOverflow.
I'm not sure to grasp how global-key would work
you need guidance in implementing a board more than anything else
I tried to follow the form to make a ticket, and gave a fake example to illustrate my point. I don't need to write a Kanban board.
Perhaps I should have been more technical from the get-go? I'd like to give VueJS hints to its reconciliation algorithm to avoid re-renders. Alternatively, I'd like to be able to re-parent components. A similar issue on React is facebook/react#3965 .
Those two comments might be clearer explanations of the need:
What problem does this feature solve?
To maintain state in an element of a list, one can use
v-bind:key
, as explained here. This makes creating a todo-list while keeping the local state intact (selections, focus, input text, other things the browser / included plugins deal with for us) trivial.However, if I happen to want more than a todo-list, like, a Kanban Board, and I want to be able to move elements across columns, well, it does not work any more.
There are some hacks that could work for this particular case (having the Kanban board be a single array, that simply looks like a Kanban board through bad CSS tricks). But they are bad, and can not be extended to more complex situations (like, a recursive todo-list, the kind that you can find on Workflowy, Dynalist, Notion, etc.).
What does the proposed API look like?
How I could see it work is with a
global-key
attribute on vue elements. It would act exactly likekey
inv-for
, but globally.The text was updated successfully, but these errors were encountered: