You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/08/07 15:53:51 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #8003: Added better display of NULL values in FilterableTable (as in SQL Lab Results)

etr2460 commented on a change in pull request #8003: Added better display of NULL values in FilterableTable (as in SQL Lab Results)
URL: https://github.com/apache/incubator-superset/pull/8003#discussion_r311631497
 
 

 ##########
 File path: superset/assets/src/components/FilterableTable/FilterableTable.jsx
 ##########
 @@ -173,13 +174,19 @@ export default class FilterableTable extends PureComponent {
   }
 
   getCellContent({ cellData, columnKey }) {
-    const content = String(cellData);
+    let content = String(cellData);
 
 Review comment:
   We generally prefer to use immutable consts over lets. I think this would probably be cleaner if you just handled the `cellData === null` case first before all this other logic. something like:
   ```
   if (cellData === null) {
     return this.complexColumns[columnKey] 
       ? ''
       : (
           <i className="null-cell-render">
             NULL
           </i>
         )
   }
   ```
   
   I'm actually not sure if truncating null to empty string is the desired behavior for complex columns though. @betodealmeida would be a good person to take a look at this too

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org