html-next/smoke-and-mirrors

Artifacts on replacement of data

Closed this issue · 12 comments

Basically If I do a search, then do another search the new results (only visible ones) have some of the old data appended on and the first vertical-item is empty. If I scroll down so a new set of records loads and then scroll back those artifacts are gone.

Example screenshot:

slice 1

("MAIN ST") was from the previous search. This only happens in the address field as far as I can tell.

The issue occurs when I replace the data directly with new data. If I clear the search after the first search, and do another search I don't see artifacts.


Give it a try here: https://stocktonca.mapgeo.alpha1.appgeo.com

  1. Search for '8 main', hit enter.
  2. Don't clear!
  3. Type in 'podesto', hit enter.
  4. See artifacts.

Ok, I think I found a workaround:

  1. Use useContentProxy=false on the vertical-collection
  2. Use clear() on the array before doing the same search, even if you replace the array after.

Note: If you set true in 1, there is an error about undefined geography.. see error below

Uncaught TypeError: Cannot read property 'geography' of null
_findFirstRenderedComponent @ vendor.js:249385
_updateChildStates @ vendor.js:249491
(anonymous function) @ vendor.js:249743
invoke @ vendor.js:14821
....

@knownasilya I can help you did in further in about two hours.

Sounds good 👍

@knownasilya I suspect this will get fixed or at least the performance of doing a clear or swap like this will improve in the next minor

Excellent!

@knownasilya let me know if 0.5.4 helped the situation out :)

Seems to have fixed it (I removed the clear and no more artifacts), let me do some more testing.

The rebuild time should also be substantially faster.

After more testing it looks like the issue persists, if you don't include the clear.

@knownasilya looking for a status update on this with 0.6.0

Will do tomorrow.

Should be fixed by updating to @html-next/vertical-collection (now re-exported by this lib)