Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions panel/widgets/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,10 @@ def _map_indexes(self, indexes: list[int], existing: list[int] = [], add: bool =
else:
start = 0
ilocs = list(existing)
index = self._processed.iloc[[start+ind for ind in indexes]].index
try:
index = self._processed.iloc[[start+ind for ind in indexes]].index
except IndexError:
index = self._processed.iloc[[]].index
for v in index.values:
try:
iloc = self.value.index.get_loc(v)
Expand All @@ -1869,7 +1872,6 @@ def _update_selection(self, indices: list[int] | SelectionEvent):
selected = indices.selected
ilocs = [] if indices.flush else self.selection.copy()
inds = indices.indices

ilocs = self._map_indexes(inds, ilocs, add=selected)
if isinstance(self.selectable, int) and not isinstance(self.selectable, bool):
ilocs = ilocs[len(ilocs) - self.selectable:]
Expand Down
Loading