Handling adding items dynamically
See original GitHub issueHi,
I have a problems with the view when updating collection. I have created a setup where I can endlessly swipe through dates (disabled the infinite scroll option). So what I did was create a collection with three dates and set the selected index on the middle one. On the CardsViewItemSwipedHandler
I then handled the right or left swipe and based on that do the following:
right swipe (previous date)
- Add a new date on index 0 and remove the last date
leftswipe (nextdate)
- Add a new date at the end and remove the date on index 0
This seems to be working for the first few swipes but after that the views gets of center (content is not completly shown). Do you have a suggestion how I can solve this ?
Thank you
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to add objects into objects dynamically in javascript?
Here is a small example that I think might help you. This creates objs with dynamic names and values and adds them to...
Read more >Dynamically creating JavaScript elements with event ...
This tutorial explores the concepts of events, event listeners, and dynamically creating new JavaScript elements by using document.
Read more >javascript - Adding <li> items dynamically to a to-do list
For a homework assignment, I have to create a "TO-DO" list, which will add a list item to the unordered list dynamically using...
Read more >Using JavaScript - Dynamically Add & Remove List Items
Dynamically Add & Remove List Items | Using JavaScript - (Sourcecode) · Kazy TV · How To Prevent Numbers In Input Field |...
Read more >How to add elements to an existing array dynamically in ...
We will discuss two methods in this article i.e. push() method and dynamically adding an element at any index using the index of...
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 FreeTop 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
Top GitHub Comments
I changed the setup yesterday and is seems to be working now. Instead of adding and removing the items in the carousel, they now have some fixed items and enabled cyclic again. In the CardsViewItemSwipedHandler I now only register the left or right action and based on that reload the bindable data in the card.
Anway thanks for this control and your help 👍
@martinvds81 enjoy it 😃
– if you like this plugin, you may STAR it ))