Skip to content

Commit 18ebefb

Browse files
Merge pull request #2121 from iamfaran/fix/2118-table-download-event
[Fix]: #2118 table download event override
2 parents 94525d1 + 8018b12 commit 18ebefb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,13 @@ export const TableCompView = React.memo((props: {
294294
)
295295
}
296296
onDownload={() => {
297-
handleChangeEvent("download");
298-
onDownload(`${compName}-data`)
297+
if (compChildren.onEvent.isBind("download")) {
298+
// Custom download handler exists
299+
handleChangeEvent("download");
300+
} else {
301+
// Download default CSV
302+
onDownload(`${compName}-data`);
303+
}
299304
}}
300305
hasChange={hasChange}
301306
onSaveChanges={() => handleChangeEvent("saveChanges")}

0 commit comments

Comments
 (0)