From 776ab04aedfd5cc48bc79c589dcf06c9495e0636 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Tue, 9 Jun 2026 11:33:45 +0200 Subject: [PATCH] commented unused insert_row_data; moved commented insert one block up --- stand/aggridx.py | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/stand/aggridx.py b/stand/aggridx.py index 827925f..f2fc038 100644 --- a/stand/aggridx.py +++ b/stand/aggridx.py @@ -53,15 +53,6 @@ class aggridx(ui.aggrid): self.ensure_column_defs(row) self.extend_row_data([row]) -# def insert(self, index, row): -# """ -# insert row at the provided index -# append any missing columns on the right side of the table -# this operation maintains the current view on the data -# """ -# self.ensure_column_defs(row) -# self.insert_row_data([row], index) - # def extend(self, rows): # """ # append rows to the bottom of the table and @@ -72,6 +63,15 @@ class aggridx(ui.aggrid): # self.ensure_column_defs(columns) # self.extend_row_data(rows) +# def insert(self, index, row): +# """ +# insert row at the provided index +# append any missing columns on the right side of the table +# this operation maintains the current view on the data +# """ +# self.ensure_column_defs(row) +# self.insert_row_data([row], index) + def ensure_column_defs(self, columns): """ @@ -108,22 +108,22 @@ class aggridx(ui.aggrid): self.run_grid_method("applyTransaction", {"add": rows}) - def insert_row_data(self, rows, index): - """ - insert rows at the provided index, - this operation maintains the current view on the data - """ - row_data = self.options["rowData"] +# def insert_row_data(self, rows, index): +# """ +# insert rows at the provided index, +# this operation maintains the current view on the data +# """ +# row_data = self.options["rowData"] - if index is None or index < 0 or len(row_data) <= index: - raise IndexError(f"index {index} is out of range") +# if index is None or index < 0 or len(row_data) <= index: +# raise IndexError(f"index {index} is out of range") - # update server without re-draw - with self.props.suspend_updates(): - row_data[index:index] = rows +# # update server without re-draw +# with self.props.suspend_updates(): +# row_data[index:index] = rows - # update client - self.run_grid_method("applyTransaction", {"add": rows, "addIndex": index}) +# # update client +# self.run_grid_method("applyTransaction", {"add": rows, "addIndex": index}) def clear(self):