Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist select when pagination=remote #5929

Merged
merged 13 commits into from
Nov 29, 2023
Merged

Persist select when pagination=remote #5929

merged 13 commits into from
Nov 29, 2023

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Nov 28, 2023

TODO:

  • I need to handle shift key logic

Example

screenrecord-2023-11-28_18.11.40.mp4
import numpy as np
import pandas as pd
import panel as pn

pn.extension("tabulator")

data = np.arange(20) + 100
df = pd.DataFrame(data)
tab = pn.widgets.Tabulator(
    value=df,
    disabled=True,
    pagination="remote",
    page_size=10,
    header_filters=True,
)
tab.servable()

panel/widgets/tables.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Attention: 171 lines in your changes are missing coverage. Please review.

Comparison is base (e3fdd48) 84.15% compared to head (471fa25) 72.04%.
Report is 7 commits behind head on main.

❗ Current head 471fa25 differs from pull request most recent head 078591f. Consider uploading reports for the commit 078591f to get more accurate results

Files Patch % Lines
panel/tests/ui/widgets/test_tabulator.py 0.59% 167 Missing ⚠️
panel/widgets/tables.py 57.14% 3 Missing ⚠️
panel/models/tabulator.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5929       +/-   ##
===========================================
- Coverage   84.15%   72.04%   -12.12%     
===========================================
  Files         291      291               
  Lines       42786    43068      +282     
===========================================
- Hits        36007    31027     -4980     
- Misses       6779    12041     +5262     
Flag Coverage Δ
ui-tests ?
unitexamples-tests 72.04% <3.38%> (-0.39%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hoxbro
Copy link
Member Author

hoxbro commented Nov 29, 2023

Shift behavior differs a bit for pagination="local" as it only looks at the current page.

screenrecord-2023-11-29_10.26.45.mp4

@hoxbro
Copy link
Member Author

hoxbro commented Nov 29, 2023

Also implemented logic if selectable is an integer like selectable=2.

screenrecord-2023-11-29_10.29.27.mp4

@philippjfr philippjfr merged commit 39ec575 into main Nov 29, 2023
12 checks passed
@philippjfr philippjfr deleted the select_remote branch November 29, 2023 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants