Skip to content

Commit

Permalink
change scroll active to scroll to
Browse files Browse the repository at this point in the history
  • Loading branch information
bsatarnejad committed Dec 10, 2024
1 parent d00aea4 commit e8c63b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/components/work_package_relations_tab/index_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def render_relation_group(title:, relation_type:, items:, &_block)
item.id
end

scroll_active = related_work_package_id.to_s == @scroll_to_id
scroll_to = related_work_package_id.to_s == @scroll_to_id
border_box.with_row(
test_selector: row_test_selector(item),
data: { scroll_active: scroll_active }
data: { scroll_to: scroll_to }
) do
yield(item)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class ScrollController extends Controller {
}

waitForRenderAndAct() {
const element = document.querySelector('[data-scroll-active="true"]');
const element = document.querySelector('[data-scroll-to="true"]');

if (element) {
element.scrollIntoView({ behavior: 'smooth', block: 'center' });
Expand Down

0 comments on commit e8c63b0

Please sign in to comment.