question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Position not ok when one column on vue-infinitegrid

See original GitHub issue

Description

When I add items to my array when I have one column (mobile) the items are added to it but I cannot see them unless I resize the screen, I inspected the code with dev tools and the position of the elements is not correct: style="position: absolute; left: -100000px; top: -100000px;"

It changes to the correct one after I resize the screen but it should appear correct when I load the new elements. This behaviour does not happen when I have two or more columns on my grid.

Any ideas on why this is happening?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
daybrushcommented, Jul 20, 2020

@akshaybosamiya

key={${image.id}_${Date.now()}} is’t it true that the key doesn’t change when rendering?

It seems that the key changes every time it is rendered.

Aren’t you writing this way in the parent component?

render() {
    const childElements = images.map(image => <div key={`${image.id}_${Date.now()}`}></div>)
}
0reactions
akshaybosamiyacommented, Jul 20, 2020

@daybrush,

Oh! My bad. Yeah, Key will differ on render. I understood group key.

Thanks a lot for the torubleshooting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make column fixed position in bootstrap - css - Stack Overflow
My fixed column only has a label in it, but for some reason when I set these classes, the label "sticks" to the...
Read more >
How to Check If One Value Exists in a Column | Excelchat
Check if a value exists in a column using Conditional Formatting · Select the values in Invoice No. column · Go to Conditional...
Read more >
Split columns by positions - Power Query | Microsoft Learn
In Power Query, you can split a column through different methods. In this case, the column(s) selected can be split by positions.
Read more >
How to change the column position of MySQL table without ...
You can change the column position of MySQL table without losing data with the help of ALTER TABLE command. The syntax is as...
Read more >
1. Retrieving Records - SQL Cookbook [Book] - O'Reilly
Using it will return every column for the table specified. Since there is no WHERE clause specified, every row will be returned as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found