Skip to content

Commit 8611f18

Browse files
committed
chore: refactor
1 parent 56204a4 commit 8611f18

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "qwik-table-loader",
3-
"version": "0.0.5-testing2",
3+
"version": "0.0.5-uat",
44
"description": "A table library for Qwik",
55
"main": "src/index.ts",
66
"engines": {

src/components/Table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default component$(
100100
{Object.keys(
101101
tableData.tHeadings.customHeadings || []
102102
).includes(heading)
103-
? tableData.tHeadings.element$[heading](
103+
? tableData.tHeadings.element$?.[heading](
104104
tableData.tHeadings.customHeadings?.[heading]!
105105
) || tableData.tHeadings.customHeadings?.[heading]
106106
: tableData.tHeadings.element$?.[heading]?.(

src/types/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type TableData = {
1212
customHeadings?: {
1313
[key: string]: string
1414
}
15-
element$: {
15+
element$?: {
1616
[key: string]: QRL<(heading: string) => any>
1717
}
1818
}
@@ -66,12 +66,12 @@ export type FilterConfigs = {
6666

6767
export type TableProps = {
6868
tData: Array<TableRecord>
69-
tHeadings: {
69+
tHeadings?: {
7070
classList?: string
7171
customHeadings?: {
7272
[key: string]: string
7373
}
74-
element$: {
74+
element$?: {
7575
[key: string]: QRL<(heading: string) => any>
7676
}
7777
}
@@ -81,7 +81,7 @@ export type TableProps = {
8181
[key: string]: string
8282
}
8383
customColumns?: {
84-
[key: string]: any
84+
[key: string]: QRL<(record: TableRecord, param: string) => any>
8585
}
8686
element$?: {
8787
[key: string]: QRL<(record: TableRecord, param: string) => any>

0 commit comments

Comments
 (0)