scroll bars added to validator and nominator tabs

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2025-02-13 14:48:57 +03:00
parent 5d73989a43
commit a2584f8212
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
5 changed files with 6 additions and 5 deletions

View File

@ -179,6 +179,7 @@ impl CurrentValidators {
let index = self.table_state
.selected()
.unwrap_or_default();
self.scroll_state = self.scroll_state.content_length(self.individual.len());
self.scroll_state = self.scroll_state.position(index);
}
}

View File

@ -135,6 +135,7 @@ impl History {
});
}
}
self.scroll_state = self.scroll_state.content_length(self.rewards.len());
}
fn update_claims(&mut self, era_index: u32, is_claimed: bool) {
@ -181,11 +182,7 @@ impl PartialComponent for History {
fn set_active(&mut self, current_tab: CurrentTab) {
match current_tab {
CurrentTab::History => self.is_active = true,
_ => {
self.is_active = false;
//self.table_state.select(None);
//self.scroll_state = self.scroll_state.position(0);
}
_ => self.is_active = false,
}
}
}

View File

@ -57,6 +57,7 @@ impl NominatorsByValidator {
}
}
self.nominators = nominators;
self.scroll_state = self.scroll_state.content_length(self.nominators.len());
}
fn first_row(&mut self) {

View File

@ -51,6 +51,7 @@ impl Peers {
}
}
self.peers = peers;
self.scroll_state = self.scroll_state.content_length(self.peers.len());
}
fn first_row(&mut self) {

View File

@ -103,6 +103,7 @@ impl Withdrawals {
let _ = self.unlockings.insert(era_index, unlocking);
},
}
self.scroll_state = self.scroll_state.content_length(self.unlockings.len());
}
fn prepare_u128(&self, value: u128) -> String {