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
22 changes: 20 additions & 2 deletions PyreactRuntimeScript/native_runtime/lifecycle_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,8 +1525,26 @@ def _apply_scroll_props(self, node, node_path):
show_scrollbar = props.get("showScrollbar", True)

track_path = self._get_scrollbar_track_path(node_path)
if track_path:
self._safe_set_visible(track_path, show_scrollbar)
if not track_path:
return

# Native scrolling_panel does not reliably cascade SetVisible from
# bar_and_track to its track/scroll_box descendants. Hide all known
# layers so showScrollbar=False removes both the rail and thumb.
paths = [
track_path,
track_path + "/stack_panel",
track_path + "/stack_panel/panel",
track_path + "/stack_panel/panel/centered_panel",
track_path + "/stack_panel/panel/centered_panel/track",
track_path + "/stack_panel/panel/centered_panel/scroll_box",
track_path + "/panel",
track_path + "/panel/centered_panel",
track_path + "/panel/centered_panel/track",
track_path + "/panel/centered_panel/scroll_box",
]
for path in paths:
self._safe_set_visible(path, show_scrollbar)

def _get_real_scroll_view_path(self, scroll_node_path):
if not scroll_node_path:
Expand Down