Skip to content

Commit 9f7642d

Browse files
committed
Post merge reverting the revert back to expected behavior
1 parent 0de93ad commit 9f7642d

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

examples/dataframe/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ def handle_edit():
9292

9393
@render.text
9494
def detail():
95-
selected_rows = input.grid_selected_rows() or ()
95+
selected_rows = grid.input_selected_rows() or ()
9696
if len(selected_rows) > 0:
9797
# "split", "records", "index", "columns", "values", "table"
98-
return df().iloc[list(input.grid_selected_rows())]
98+
return df().iloc[list(grid.input_selected_rows())]
9999

100100

101101
app = App(app_ui, server)

shiny/api-examples/data_frame/app-core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def summary_data():
4444

4545
@reactive.calc
4646
def filtered_df():
47-
req(input.summary_data_selected_rows())
47+
req(summary_data.input_selected_rows())
4848

49-
# input.summary_data_selected_rows() is a tuple, so we must convert it to list,
49+
# summary_data.input_selected_rows() is a tuple, so we must convert it to list,
5050
# as that's what Pandas requires for indexing.
51-
selected_idx = list(input.summary_data_selected_rows())
51+
selected_idx = list(summary_data.input_selected_rows())
5252
countries = summary_df.iloc[selected_idx]["country"]
5353
# Filter data for selected countries
5454
return df[df["country"].isin(countries)]

shiny/api-examples/data_frame/app-express.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ def country_detail_percap():
6666

6767
@reactive.calc
6868
def filtered_df():
69-
req(input.summary_data_selected_rows())
69+
req(summary_data.input_selected_rows())
7070

71-
# input.summary_data_selected_rows() is a tuple, so we must convert it to list,
71+
# summary_data.input_selected_rows() is a tuple, so we must convert it to list,
7272
# as that's what Pandas requires for indexing.
7373

74-
selected_idx = list(input.summary_data_selected_rows())
74+
selected_idx = list(summary_data.input_selected_rows())
7575
countries = summary_df.iloc[selected_idx]["country"]
7676
# Filter data for selected countries
7777
return df[df["country"].isin(countries)]

tests/playwright/deploys/plotly/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ def summary_data():
6161

6262
@reactive.calc
6363
def filtered_df():
64-
req(input.summary_data_selected_rows())
64+
req(summary_data.input_selected_rows())
6565

66-
# input.summary_data_selected_rows() is a tuple, so we must convert it to list,
66+
# summary_data.input_selected_rows() is a tuple, so we must convert it to list,
6767
# as that's what Pandas requires for indexing.
68-
selected_idx = list(input.summary_data_selected_rows())
68+
selected_idx = list(summary_data.input_selected_rows())
6969
countries = summary_df.iloc[selected_idx]["country"]
7070
# Filter data for selected countries
7171
return df[df["country"].isin(countries)]

tests/playwright/shiny/bugs/0676-row-selection/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ def grid():
3737

3838
@render.table
3939
def detail():
40-
selected_rows = cast("tuple[int]", input.grid_selected_rows() or ())
40+
selected_rows = cast("tuple[int]", grid.input_selected_rows() or ())
4141
if len(selected_rows) > 0:
4242
return df.iloc[list(selected_rows)]
4343

4444
@render.text
4545
def debug():
46-
return input.grid_selected_rows()
46+
return str(grid.input_selected_rows())
4747

4848

4949
app = App(app_ui, server, debug=True)

0 commit comments

Comments
 (0)