Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bielefeld-CeBiTec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2024 Competition
Bielefeld-CeBiTec
Commits
e7e74be8
Commit
e7e74be8
authored
4 months ago
by
Liliana Sanfilippo
Browse files
Options
Downloads
Patches
Plain Diff
unused declarations
parent
8de145e4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#531605
failed
4 months ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/utils/TabNavigation.ts
+1
-2
1 addition, 2 deletions
src/utils/TabNavigation.ts
src/utils/openTab.ts
+6
-8
6 additions, 8 deletions
src/utils/openTab.ts
with
7 additions
and
10 deletions
src/utils/TabNavigation.ts
+
1
−
2
View file @
e7e74be8
...
...
@@ -12,8 +12,7 @@ export const useTabNavigation = () => {
const
[
activeTab
,
setActiveTab
]
=
useState
<
string
|
null
>
(
null
);
const
[
activeSubTab
,
setActiveSubTab
]
=
useState
<
string
|
null
>
(
null
);
const
[
activeCollapsible
,
setActiveCollapsible
]
=
useState
<
string
|
null
>
(
null
);
const
[
activeTabInCollapsible
,
setActiveTabInCollapsible
]
=
useState
<
string
|
null
>
(
null
);
const
[,
setActiveCollapsible
]
=
useState
<
string
|
null
>
(
null
);
// tab change and url update
...
...
This diff is collapsed.
Click to expand it.
src/utils/openTab.ts
+
6
−
8
View file @
e7e74be8
// function to open a main tab
// Function to open a main tab
export
const
openTab
=
(
tabId
:
string
,
tabClass
:
string
)
=>
{
console
.
log
(
`
Versuche, T
ab
m
it ID
${
tabId
}
zu finden
`
);
console
.
log
(
`
Trying to find t
ab
w
it
h
ID
${
tabId
}
`
);
const
selectedTab
=
document
.
querySelector
(
`#
${
tabId
}
`
);
if
(
selectedTab
)
{
console
.
log
(
'
Tab
ge
fund
en
!
'
);
console
.
log
(
'
Tab f
o
und!
'
);
const
tabs
=
document
.
getElementsByClassName
(
tabClass
);
for
(
let
index
=
0
;
index
<
tabs
.
length
;
index
++
)
{
(
tabs
[
index
]
as
HTMLElement
).
style
.
display
=
'
none
'
;
...
...
@@ -13,11 +12,10 @@ export const openTab = (tabId: string, tabClass: string) => {
if
(
selectedTab
)
{
selectedTab
.
style
.
display
=
'
block
'
;
selectedTab
.
style
.
visibility
=
'
visible
'
;
selectedTab
.
style
.
position
=
'
relative
'
;
//
Falls es ein Positionierungsproblem gibt
selectedTab
.
style
.
zIndex
=
'
10
'
;
selectedTab
.
style
.
position
=
'
relative
'
;
//
In case there's a positioning issue
selectedTab
.
style
.
zIndex
=
'
10
'
;
// Ensure the tab is above other elements
}
}
else
{
console
.
error
(
`Tab
m
it ID
${
tabId
}
wurde nicht gef
und
en
.`
);
console
.
error
(
`Tab
w
it
h
ID
${
tabId
}
not fo
und.`
);
}
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment