Refactored to require handlers to specify the components they rely on and to specify when they are ready. This fixes a lot of bugs with the UI when users try to press buttons while the application is still loading.

This commit is contained in:
2024-07-17 19:55:10 -06:00
parent 9104b7c356
commit d84e7dfcab
49 changed files with 5143 additions and 265 deletions
+11
View File
@@ -638,6 +638,17 @@ mod tests {
assert_eq!(stateful_table.search, None);
}
#[test]
fn test_stateful_table_is_empty() {
let mut stateful_table = create_test_stateful_table();
assert!(!stateful_table.is_empty());
stateful_table = StatefulTable::default();
assert!(stateful_table.is_empty());
}
fn create_test_stateful_table() -> StatefulTable<&'static str> {
let mut stateful_table = StatefulTable::default();
stateful_table.set_items(vec!["Test 1", "Test 2"]);