finos / perspective

A data visualization and analytics component, especially well-suited for large and/or streaming datasets.
https://perspective.finos.org/
Apache License 2.0
8.38k stars 1.17k forks source link

Table View with PerspectiveWidget shows duplicated rows when table get updated #2506

Closed gangtao closed 8 months ago

gangtao commented 8 months ago

Bug Report

Steps to Reproduce:

  1. open the stack created by https://mybinder.org/ with github repo https://github.com/gangtao/perspective-table-demo
  2. run notebook mytable.ipynb
  3. the table view got updated with two rows for each update

https://github.com/finos/perspective/assets/3509037/0f6a267b-79f1-46cd-92f8-f65b5719d4e2

from perspective import Table, PerspectiveWidget
import time
rows = [{"a": 1, "b": True}, {"a": 2, "b": False}]
table = Table(rows)
PerspectiveWidget(table)

for i in range(10):
    table.update({
        "a": [i],
        "b": [True]
    })
    time.sleep(1)

Expected Result:

the table view should only show one new row each time when table get updated

Actual Result:

the table view get updated with two rows every second

Environment:

mybinder jupyterlab 3.6.6 perspective-python==2.7.1

Additional Context:

texodus commented 8 months ago

I've told you three times now this is not a Perspective bug.