-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Code:
<sortable-list class="items-sortable" on-sort-finish="_onSortFinish" dragging="{{dragging}}"
sortable=".item" items="{{someItemsSorted}}">
<template is="dom-repeat" items="[[itemsUpdatableFromApi]]">
<div class="item"> ....
...
...This issue is that when itemsUpdatableFromApi variable is changing, and the order of them changed, the order of items in component keep not changed. However, the data in items is updating correctly.
To clarify the issue I will describe steps:
- Items in sortable-list:
<div id="51">1</div>
<div id="52">2</div>
<div id="53">3</div>- Move item with id 53 up:
<div id="51">1</div>
<div id="53">3</div>
<div id="52">2</div>- Send API request on on-sort-finish to change the priorities (sort order)
- Update the items (in code above we just change the property itemsUpdatableFromApi with data, fetched from API)
<div id="51">1</div>
<div id="52">3</div>
<div id="53">2</div>So, the id is changed and this is the correct data, but the order of displaying should be changed too. Because from API I receive items correctly ordered by priority (1,2,3)). But when I refresh the page, the order of items is correct:
<div id="51">1</div>
<div id="53">2</div>
<div id="52">3</div>RoXuS and armujahid
Metadata
Metadata
Assignees
Labels
No labels