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
18eef4c1
Commit
18eef4c1
authored
Mar 17, 2024
by
Venkaiah Naidu Singamchetty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
table if no data available added message'
parent
c4a1b6f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
index.jsx
src/components/table/index.jsx
+5
-0
No files found.
src/components/table/index.jsx
View file @
18eef4c1
...
...
@@ -3,6 +3,7 @@ import Loading from "../loading Component/Loading";
function
Table
({
headers
,
data
,
loading
,
maxHeight
})
{
if
(
loading
)
return
<
Loading
/>
if
(
data
?.
length
)
return
(
<
div
className=
{
` overflow-x-auto sm:rounded-lg p-4 max-h-[${maxHeight}vh]`
}
>
<
table
className=
"w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400 bg-transparent justify-center border-separate border-spacing-y-2"
>
...
...
@@ -34,6 +35,10 @@ function Table({headers, data,loading, maxHeight}) {
</
div
>
</
div
>
);
else
return
<
div
className=
"w-full h-full"
>
<
p
className=
"text-center align-middle mt-28 text-blue-500"
>
No records to display
</
p
>
</
div
>
}
export
default
Table
;
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