@campxdev/shared 1.11.38 → 1.11.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -53,6 +53,7 @@ interface TableProps<T> {
|
|
|
53
53
|
onSort?: (sort: any) => void
|
|
54
54
|
dense?: boolean
|
|
55
55
|
showTotal?: boolean
|
|
56
|
+
showNoDataIllustration?: boolean
|
|
56
57
|
sx?: Record<string, SxProps<Theme>>
|
|
57
58
|
totalColumns?: number[]
|
|
58
59
|
showTotalInFirstCellOfTotalRow?: boolean
|
|
@@ -68,6 +69,7 @@ export default function Table<T>({
|
|
|
68
69
|
onSort,
|
|
69
70
|
dense = false,
|
|
70
71
|
showTotal = false,
|
|
72
|
+
showNoDataIllustration = true,
|
|
71
73
|
sx,
|
|
72
74
|
totalColumns,
|
|
73
75
|
showTotalInFirstCellOfTotalRow,
|
|
@@ -258,7 +260,9 @@ export default function Table<T>({
|
|
|
258
260
|
</TableBody>
|
|
259
261
|
) : (
|
|
260
262
|
<>
|
|
261
|
-
|
|
263
|
+
{showNoDataIllustration ? (
|
|
264
|
+
<NoRecordsFound colLength={columns?.length} />
|
|
265
|
+
) : null}
|
|
262
266
|
</>
|
|
263
267
|
)}
|
|
264
268
|
</>
|
|
@@ -27,14 +27,14 @@ export default function TabsContainer({
|
|
|
27
27
|
tabMobileUnderlineColor,
|
|
28
28
|
currentTabIndex = 0,
|
|
29
29
|
}: TabsContainerProps) {
|
|
30
|
-
const [currentTab, setCurrentTab] = useState(tabs[currentTabIndex]
|
|
30
|
+
const [currentTab, setCurrentTab] = useState(tabs[currentTabIndex]?.key)
|
|
31
31
|
|
|
32
32
|
const handleTabsChange = (_event: ChangeEvent<{}>, value: string): void => {
|
|
33
33
|
setCurrentTab(value)
|
|
34
34
|
onTabChange && onTabChange(value)
|
|
35
35
|
}
|
|
36
36
|
useEffect(() => {
|
|
37
|
-
setCurrentTab(tabs[currentTabIndex]
|
|
37
|
+
setCurrentTab(tabs[currentTabIndex]?.key)
|
|
38
38
|
}, [])
|
|
39
39
|
|
|
40
40
|
return (
|
|
@@ -53,9 +53,9 @@ export default function TabsContainer({
|
|
|
53
53
|
>
|
|
54
54
|
{tabs.map((tab) => (
|
|
55
55
|
<Tab
|
|
56
|
-
key={tab
|
|
56
|
+
key={tab?.key}
|
|
57
57
|
label={tab.label}
|
|
58
|
-
value={tab
|
|
58
|
+
value={tab?.key}
|
|
59
59
|
icon={tab.highlight ? <span>{'.'}</span> : null}
|
|
60
60
|
iconPosition="end"
|
|
61
61
|
/>
|
|
@@ -63,7 +63,7 @@ export default function TabsContainer({
|
|
|
63
63
|
</StyledTabs>
|
|
64
64
|
<StyledComponentWrapper containerVariant={containerVariant}>
|
|
65
65
|
<ErrorBoundary>
|
|
66
|
-
{tabs.find((tab) => tab
|
|
66
|
+
{tabs.find((tab) => tab?.key === currentTab)?.component}
|
|
67
67
|
</ErrorBoundary>
|
|
68
68
|
</StyledComponentWrapper>
|
|
69
69
|
</StyledContainer>
|