Skip to content

Commit

Permalink
rename border box filter bulkActionContainer target to hideWhenFiltering
Browse files Browse the repository at this point in the history
  • Loading branch information
toy committed Dec 13, 2024
1 parent 8411302 commit 92c5ffd
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
end
end
header_container.with_column(flex_layout: true, justify_content: :flex_end) do |actions_container|
actions_container.with_column(data: { 'projects--settings--border-box-filter-target': 'bulkActionContainer' }) do
actions_container.with_column(data: { 'projects--settings--border-box-filter-target': 'hideWhenFiltering' }) do
render(Primer::Beta::Button.new(
tag: :a,
href: enable_all_project_settings_life_cycle_path(project_id: project),
@@ -45,7 +45,7 @@
t('projects.settings.actions.label_enable_all')
end
end
actions_container.with_column(data: { 'projects--settings--border-box-filter-target': 'bulkActionContainer' }) do
actions_container.with_column(data: { 'projects--settings--border-box-filter-target': 'hideWhenFiltering' }) do
render(Primer::Beta::Button.new(
tag: :a,
href: disable_all_project_settings_life_cycle_path(project_id: project),
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
end
end
section_header_container.with_column(flex_layout: true, justify_content: :flex_end) do |actions_container|
actions_container.with_column(data: { 'projects--settings--border-box-filter-target': 'bulkActionContainer' }) do
actions_container.with_column(data: { 'projects--settings--border-box-filter-target': 'hideWhenFiltering' }) do
render(Primer::Beta::Button.new(
tag: :a,
href: enable_all_of_section_project_settings_project_custom_fields_path(
@@ -32,7 +32,7 @@
t('projects.settings.actions.label_enable_all')
end
end
actions_container.with_column(data: { 'projects--settings--border-box-filter-target': 'bulkActionContainer' }) do
actions_container.with_column(data: { 'projects--settings--border-box-filter-target': 'hideWhenFiltering' }) do
render(Primer::Beta::Button.new(
tag: :a,
href: disable_all_of_section_project_settings_project_custom_fields_path(
Original file line number Diff line number Diff line change
@@ -32,10 +32,10 @@ import FilterListController from '../../filter/filter-list.controller';

export default class extends FilterListController {
static targets = [
'bulkActionContainer',
'hideWhenFiltering',
];

declare readonly bulkActionContainerTargets:HTMLInputElement[];
declare readonly hideWhenFilteringTargets:HTMLInputElement[];

filterLists() {
const query = this.filterTarget.value.toLowerCase();
@@ -56,13 +56,13 @@ export default class extends FilterListController {
}

hideBulkActionContainers() {
this.bulkActionContainerTargets.forEach((item) => {
this.hideWhenFilteringTargets.forEach((item) => {
this.setVisibility(item, false);
});
}

showBulkActionContainers() {
this.bulkActionContainerTargets.forEach((item) => {
this.hideWhenFilteringTargets.forEach((item) => {
this.setVisibility(item, true);
});
}

0 comments on commit 92c5ffd

Please sign in to comment.