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
The only difference is on line 58 where i've swapped the non-working:
<const/items=Object.values(group.items) />
With the working:
<const/items=group.items />
See the reproduction steps below for instructions on recreating the issue
Expected Behavior
Clicking an item should move it to the new list and remove it from the old list.
Actual Behavior
The item is added to the new list, but also remains in the old list.
Possible Fix
This may be an issue in the tags-api-preview but I'm not sure. If I had to guess, it would have something to do with dependency tracking in member expressions causing the old list not update correctly. This issue does not seem to be present In tags api versions below 0.6.0, ie 0.5.5 (but this also requires a lower marko version, so I couldn't rule out that this was an issue in the compiler).
Additional Info
Your Environment
Environment name and version (e.g. Chrome 39, node.js 5.4): Bun 1.0.6, Chrome Version 117.0.5938.149 (Official Build) (arm64)
Operating System and version (desktop or mobile): Macbook Pro 13-inch, Apple M1 (2020)
Link to your project: N/A
Steps to Reproduce
View the incorrectly working example above in the Marko playground
Click "Apple Pie" then click "Move 1 item here" next to Appetizers
Notice that "Apple Pie" is displayed twice. Also note that the "Actual Data" section displays the correct representation where Apple Pie only exists in one llist
View the correct example or swap Object.values(group.items) with just group.items.
Perform the same steps as above and note that everything works correctly
Stack Trace
The text was updated successfully, but these errors were encountered:
Marko Version: 5.31.12
marko@5.31.12
@marko/compiler@5.33.3
@marko/tags-api-preview@0.7.2
(This issue happens in the marko online playground as well, so whatever environment that uses is also affected)
Details
Dependency tracking in tags api components seems to behave incorrectly based on the type of expression used in the tag.
This example behaves incorrectly.
This example behaves correctly.
The only difference is on line 58 where i've swapped the non-working:
With the working:
See the reproduction steps below for instructions on recreating the issue
Expected Behavior
Clicking an item should move it to the new list and remove it from the old list.
Actual Behavior
The item is added to the new list, but also remains in the old list.
Possible Fix
This may be an issue in the tags-api-preview but I'm not sure. If I had to guess, it would have something to do with dependency tracking in member expressions causing the old list not update correctly. This issue does not seem to be present In tags api versions below
0.6.0
, ie0.5.5
(but this also requires a lower marko version, so I couldn't rule out that this was an issue in the compiler).Additional Info
Your Environment
Steps to Reproduce
Object.values(group.items)
with justgroup.items
.Stack Trace
The text was updated successfully, but these errors were encountered: