You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon invoking update_row_data(instance, data) on MDDataTable, number of pages and records update accordingly when new data gets loaded, but pagination picker (5/10/15 records per page, etc.) is not active and doesn't get updated (take a note how it's stuck at 0 on a screenshot). It doesn't depend on whether I create an empty row on init or initialise the table with empty list of rows. Works fine if 15+ rows is passed when initialising the table.
Code and Logs
fromkivy.metricsimportdpfromkivymd.uix.stacklayoutimportStackLayoutfromkivy.propertiesimportObjectPropertyfromkivymd.appimportMDAppfromkivymd.uix.datatablesimportMDDataTableclassMainWindow(StackLayout):
data_tables=ObjectProperty(None)
def__init__(self):
super().__init__()
self.data_tables=MDDataTable(
size_hint=(1, 0.95),
use_pagination=True,
rows_num=7,
column_data=[("field1", dp(30)), ("field2", dp(30))],
)
self.add_widget(self.data_tables)
# This is done dynamically in my app, for the sake of minimizing the example I wrote it in the init section.self.data_tables.update_row_data(
instance_data_table=self.data_tables, data=[("1", "3"), ("7", "8")])
classApp(MDApp):
controller=ObjectProperty(None)
defbuild(self):
returnMainWindow()
App().run()
Screenshots
Versions
OS: macOS Monterey 12.3.1
Python: 3.9.12
Kivy: 2.1.0
KivyMD: 1.0.0-dev0
The text was updated successfully, but these errors were encountered:
Honda-a
added a commit
to Honda-a/KivyMD
that referenced
this issue
May 16, 2022
Description of the Bug
Upon invoking update_row_data(instance, data) on MDDataTable, number of pages and records update accordingly when new data gets loaded, but pagination picker (5/10/15 records per page, etc.) is not active and doesn't get updated (take a note how it's stuck at 0 on a screenshot). It doesn't depend on whether I create an empty row on init or initialise the table with empty list of rows. Works fine if 15+ rows is passed when initialising the table.
Code and Logs
Screenshots
Versions
The text was updated successfully, but these errors were encountered: