Hello! I have recently discovered Perspective pane and was very surprised by how fast and feature rich it is ! I wanted to make a dashboard using it but got stuck on trying to remove rows from it.
After seeing this question Delete row from tabulator I thought I could just substitute the underlying data holder which in this case appears to be object. Unfortunately, the code below does not work. As in, clicking the button does not change the rows visible in the Perspective.
import panel as pn
pn.extension('perspective')
data = {'x': [1, 2, 3], 'y': [1, 2, 3]}
perspective = pn.pane.Perspective(data, width=1000)
button = pn.widgets.Button(name="Update")
def update(placeholder):
data = {'x': [1, 2], 'y': [1, 2]}
perspective.object = data
button.on_click(update)
pn.Column(
perspective,
button
).servable()
Is there some other way? Or this is simply not supported? I would be happy to add such a feature if someone could link me a PR with a similar change.
How can I delete rows with it? I tried setting rows to None but that doesn’t remove them. It just sets them to a special ‘None’ value which then still affects sorting or split by.