any examples for storing the remove events and add events?
See original GitHub issueHi,
I have tried the store options, it works, but how can I save even after I remove or add items? plz advise.
My code:
var tagOrder = new Sortable(tagEle, {
animation: 150,
filter: ".js-remove",
ghostClass: "sortable-ghost",
onFilter: function (evt) {
var el = tagOrder.closest(evt.item);
el && el.parentNode.removeChild(el);
},
group: 'tags-list',
store: {
get: function (sortable) {
var order = localStorage.getItem(sortable.options.group);
console.log(localStorage.getItem(sortable.options.onFilter));
return order ? order.split('|') : [];
},
set: function (sortable) {
var order = sortable.toArray();
localStorage.setItem(sortable.options.group, order.join('|'));
}
}
});
Issue Analytics
- State:
- Created 9 years ago
- Comments:6
Top Results From Across the Web
Window: storage event - Web APIs | MDN
The storage event of the Window interface fires when a storage area (localStorage) has been modified in the context of another document.
Read more >Add, modify, or delete events in Calendar on Mac
Add, modify, or delete events in Calendar on Mac. Use the Calendar app to schedule meetings, appointments, family activities, and other events.
Read more >Removing events · Issue #557 · RailsEventStore ... - GitHub
Hi, We're started using you amazing library to publish and store several events but I just realized there are some of them which...
Read more >Handling and Raising Events | Microsoft Learn
The following example shows how to declare an event named ThresholdReached . The event is associated with the EventHandler delegate and ...
Read more >Removing an anonymous event listener - Stack Overflow
There is no way to cleanly remove an event handler unless you stored a reference to the event handler at creation. I will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Try dev-branch: https://github.com/RubaXa/Sortable/tree/dev#save
oh, sorry, I thought there was an option to save the remove items on localStorage also.