Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nisum-scorecard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Venkaiah Naidu Singamchetty
nisum-scorecard
Commits
46c5865c
Commit
46c5865c
authored
Apr 01, 2024
by
Shiva Komirishetti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert table changes
parent
4dacbbff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
index.jsx
src/components/table/index.jsx
+2
-4
No files found.
src/components/table/index.jsx
View file @
46c5865c
...
...
@@ -3,11 +3,9 @@ import { useSelector, useDispatch} from "react-redux";
import
{
setSortKey
,
setSortOrder
}
from
'../../redux/reducers/reporteesSlice'
;
import
Loading
from
"../loading Component/Loading"
;
import
SortButton
from
"../sortButton"
;
import
SetWindowSize
from
'../../utils/SetWindowSize'
;
function
Table
({
headers
,
data
,
loading
,
handleSorting
})
{
const
dispatch
=
useDispatch
();
const
[
windowWidth
,
windowHeight
]
=
SetWindowSize
()
const
{
sortKey
,
sortOrder
}
=
useSelector
((
state
)
=>
state
.
reportees
);
// const [sortedData, setSortedData] = useState([]);
// const [sortKey, setSortKey] = useState(null);
...
...
@@ -61,9 +59,9 @@ function Table({headers, data,loading, handleSorting }) {
if
(
loading
)
return
<
Loading
/>
else
return
(
<
div
className=
{
` overflow-auto sm:rounded-lg p-4
py-0 bg-gray-100`
}
style=
{
{
height
:
`calc(${windowHeight}px - 170px)`
}
}
>
<
div
className=
{
` overflow-auto sm:rounded-lg p-4
bg-gray-100`
}
>
<
table
className=
"w-full text-sm text-left rtl:text-right text-gray-500 bg-transparent justify-center border-separate border-spacing-y-2"
>
<
thead
className=
"text-xs text-gray-700 uppercase bg-gray-50
sticky top-0
"
>
<
thead
className=
"text-xs text-gray-700 uppercase bg-gray-50"
>
<
tr
className=
"mb-2"
>
{
headers
?.
map
((
item
,
index
)
=>
(
<
th
key=
{
index
}
scope=
"col"
className=
{
`px-6 py-4 w-[${item.width}]`
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment