Skip to content

Commit ed4f0ca

Browse files
committedMay 7, 2024·
fix ts issue for JSONTableDelegate.addItem
1 parent 75025a4 commit ed4f0ca

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed
 

Diff for: ‎ex1/readme.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ JSONTableDelegate.fetchProperties = async () => {
3434
const _createColumn = (propertyInfo:TablePropertyInfo, table:Table) => {
3535
const name = propertyInfo.key
3636
const id = table.getId() + "---col-" + name
37-
return Element.getElementById(id) ?? new Column(id, {
37+
const column = Element.getElementById(id) as Column
38+
return column ?? new Column(id, {
3839
propertyKey: name,
3940
header: propertyInfo.label,
4041
template: new Text({

Diff for: ‎ex1/webapp/delegate/JSONTableDelegate.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ JSONTableDelegate.fetchProperties = async () => {
1818
const _createColumn = (propertyInfo:TablePropertyInfo, table:Table) => {
1919
const name = propertyInfo.key
2020
const id = table.getId() + "---col-" + name
21-
return Element.getElementById(id) ?? new Column(id, {
21+
const column = Element.getElementById(id) as Column
22+
return column ?? new Column(id, {
2223
propertyKey: name,
2324
header: propertyInfo.label,
2425
template: new Text({

Diff for: ‎ex2/webapp/delegate/JSONTableDelegate.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ JSONTableDelegate.fetchProperties = async () => {
2121
const _createColumn = (propertyInfo:TablePropertyInfo, table:Table) => {
2222
const name = propertyInfo.key
2323
const id = table.getId() + "---col-" + name
24-
return Element.getElementById(id) ?? new Column(id, {
24+
const column = Element.getElementById(id) as Column
25+
return column ?? new Column(id, {
2526
propertyKey: name,
2627
header: propertyInfo.label,
2728
template: new Text({

Diff for: ‎ex3/webapp/delegate/JSONTableDelegate.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ JSONTableDelegate.fetchProperties = async () => {
2121
const _createColumn = (propertyInfo:TablePropertyInfo, table:Table) => {
2222
const name = propertyInfo.key
2323
const id = table.getId() + "---col-" + name
24-
return Element.getElementById(id) ?? new Column(id, {
24+
const column = Element.getElementById(id) as Column
25+
return column ?? new Column(id, {
2526
propertyKey: name,
2627
header: propertyInfo.label,
2728
template: new Text({

Diff for: ‎ex4/webapp/delegate/JSONTableDelegate.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ JSONTableDelegate.fetchProperties = async () => {
2323
const _createColumn = (propertyInfo:TablePropertyInfo, table:Table) => {
2424
const name = propertyInfo.key
2525
const id = table.getId() + "---col-" + name
26-
return Element.getElementById(id) ?? new Column(id, {
26+
const column = Element.getElementById(id) as Column
27+
return column ?? new Column(id, {
2728
propertyKey: name,
2829
header: propertyInfo.label,
2930
template: new Text({

Diff for: ‎ex5/webapp/delegate/JSONTableDelegate.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ JSONTableDelegate.fetchProperties = async () => {
2323
const _createColumn = (propertyInfo:TablePropertyInfo, table:Table) => {
2424
const name = propertyInfo.key
2525
const id = table.getId() + "---col-" + name
26-
return Element.getElementById(id) ?? new Column(id, {
26+
const column = Element.getElementById(id) as Column
27+
return column ?? new Column(id, {
2728
propertyKey: name,
2829
header: propertyInfo.label,
2930
template: new Text({

0 commit comments

Comments
 (0)
Please sign in to comment.