dididy commented on code in PR #5075:
URL: https://github.com/apache/zeppelin/pull/5075#discussion_r2355295764


##########
zeppelin-web-angular/src/app/visualizations/table/table-visualization.component.ts:
##########
@@ -96,11 +89,8 @@ export class TableVisualizationComponent implements OnInit {
     this.filterRows();
   }
 
-  onSortChange(type: 'descend' | 'ascend' | string, key: string): void {
-    const opt = this.colOptions.get(key);
-    if (!opt) {
-      throw new Error('opt is not found');
-    }
+  onSortChange(type: 'descend' | 'ascend' | string | null, key: string): void {

Review Comment:
   ```suggestion
     onSortChange(key: string, type?: 'descend' | 'ascend'): void {
   ```
   Was the `null` added because of added tsconfig option? With the above 
modification, and by adjusting the parameter order in `nzSortChange` within 
**table-visualization.component.html**(https://github.com/apache/zeppelin/pull/5075/commits/02021763ba2da91bed2cfdc486a0617fef3b3548#diff-da0b297d95609bb39dfce32ab16e7d6a9cb24adf5eb8897891bb5ab231f73309R49)
 as 
this(https://github.com/apache/zeppelin/pull/5075/commits/02021763ba2da91bed2cfdc486a0617fef3b3548#diff-da0b297d95609bb39dfce32ab16e7d6a9cb24adf5eb8897891bb5ab231f73309R77),
 it seems cleaner — though it needs to be confirmed whether this actually 
passes the type check.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to