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

🚀 create a selected_visible_cell_iterator property #511

Merged
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
14 changes: 10 additions & 4 deletions ipydatagrid/datagrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,9 @@ def selected_cells(self):
).all()

@property
def selected_cell_values(self):
def selected_visible_cell_iterator(self):
"""
List of values for all selected cells.
An iterator to traverse selected visible cells one by one.
"""
# Copy of the front-end data model
view_data = self.get_visible_data()
Expand All @@ -776,10 +776,16 @@ def selected_cell_values(self):
view_data_object = self.generate_data_object(
view_data, "ipydguuid", index_key
)

return SelectionHelper(
view_data_object, self.selections, self.selection_mode
).all_values()
)

@property
def selected_cell_values(self):
"""
List of values for all selected cells.
"""
return self.selected_visible_cell_iterator.all_values()

@property
def selected_cell_iterator(self):
Expand Down
Loading