fix: Updated the name of the should_ignore_quit_key to ignore_special_keys_for_textbox_input to give a better idea of what the flag is used for; also added alt keybinding for backspace
This commit is contained in:
1 parent
f25829f3c1
commit
cf00d7992e
80 files changed
+584
-435
No files matched your search
@@ -42,12 +42,12 @@ macro_rules! handle_table_events {
|
||||
fn [<handle_ $name _table_events>](&mut $self, config: $crate::handlers::table_handler::TableHandlingConfig<$row>) -> bool {
|
||||
if $self.is_ready() {
|
||||
match $self.key {
|
||||
_ if $crate::matches_key!(up, $self.key, $self.ignore_alt_navigation()) => $self.[<handle_ $name _table_scroll_up>](config),
|
||||
_ if $crate::matches_key!(down, $self.key, $self.ignore_alt_navigation()) => $self.[<handle_ $name _table_scroll_down>](config),
|
||||
_ if $crate::matches_key!(up, $self.key, $self.ignore_special_keys()) => $self.[<handle_ $name _table_scroll_up>](config),
|
||||
_ if $crate::matches_key!(down, $self.key, $self.ignore_special_keys()) => $self.[<handle_ $name _table_scroll_down>](config),
|
||||
_ if $crate::matches_key!(home, $self.key) => $self.[<handle_ $name _table_home>](config),
|
||||
_ if $crate::matches_key!(end, $self.key) => $self.[<handle_ $name _table_end>](config),
|
||||
_ if $crate::matches_key!(left, $self.key, $self.ignore_alt_navigation())
|
||||
|| $crate::matches_key!(right, $self.key, $self.ignore_alt_navigation()) =>
|
||||
_ if $crate::matches_key!(left, $self.key, $self.ignore_special_keys())
|
||||
|| $crate::matches_key!(right, $self.key, $self.ignore_special_keys()) =>
|
||||
{
|
||||
$self.[<handle_ $name _table_left_right>](config)
|
||||
}
|
||||
@@ -244,7 +244,7 @@ macro_rules! handle_table_events {
|
||||
&& $self.app.get_current_route() == *config.searching_block.as_ref().unwrap() =>
|
||||
{
|
||||
$self.app.pop_navigation_stack();
|
||||
$self.app.should_ignore_quit_key = false;
|
||||
$self.app.ignore_special_keys_for_textbox_input = false;
|
||||
|
||||
if $table.search.is_some() {
|
||||
let search_field_fn = config
|
||||
@@ -267,7 +267,7 @@ macro_rules! handle_table_events {
|
||||
&& $self.app.get_current_route() == *config.filtering_block.as_ref().unwrap() =>
|
||||
{
|
||||
$self.app.pop_navigation_stack();
|
||||
$self.app.should_ignore_quit_key = false;
|
||||
$self.app.ignore_special_keys_for_textbox_input = false;
|
||||
|
||||
if $table.filter.is_some() {
|
||||
let filter_field_fn = config
|
||||
@@ -305,7 +305,7 @@ macro_rules! handle_table_events {
|
||||
{
|
||||
$self.app.pop_navigation_stack();
|
||||
$table.reset_search();
|
||||
$self.app.should_ignore_quit_key = false;
|
||||
$self.app.ignore_special_keys_for_textbox_input = false;
|
||||
true
|
||||
}
|
||||
_ if (config.filtering_block.is_some()
|
||||
@@ -315,7 +315,7 @@ macro_rules! handle_table_events {
|
||||
{
|
||||
$self.app.pop_navigation_stack();
|
||||
$table.reset_filter();
|
||||
$self.app.should_ignore_quit_key = false;
|
||||
$self.app.ignore_special_keys_for_textbox_input = false;
|
||||
true
|
||||
}
|
||||
_ if config.table_block == $self.app.get_current_route()
|
||||
@@ -335,7 +335,7 @@ macro_rules! handle_table_events {
|
||||
.push_navigation_stack(config.filtering_block.expect("Filtering block is undefined").into());
|
||||
$table.reset_filter();
|
||||
$table.filter = Some($crate::models::HorizontallyScrollableText::default());
|
||||
$self.app.should_ignore_quit_key = true;
|
||||
$self.app.ignore_special_keys_for_textbox_input = true;
|
||||
|
||||
true
|
||||
} else {
|
||||
@@ -349,7 +349,7 @@ macro_rules! handle_table_events {
|
||||
.app
|
||||
.push_navigation_stack(config.searching_block.expect("Searching block is undefined"));
|
||||
$table.search = Some($crate::models::HorizontallyScrollableText::default());
|
||||
$self.app.should_ignore_quit_key = true;
|
||||
$self.app.ignore_special_keys_for_textbox_input = true;
|
||||
|
||||
true
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user