quintanar401 / kdb-wc

kdb+ web components
MIT License
59 stars 25 forks source link

Null values break tables #3

Closed leonbaum closed 8 years ago

leonbaum commented 8 years ago

Is there an easy way to get the following working? I would expect the null values to be represented by blank cells in the table. <kdb-table>([]x:1 0n 3f)</kdb-table>

Fixing null values would also allow for empty tables to be displayed (after transforming by 1#0#t to get the column names in the json).

quintanar401 commented 8 years ago

Fixed - JS null will be converted to ""

leonbaum commented 8 years ago

Thanks! The null values now work as expected. However, the change appears also to be blanking zero values, e.g., <kdb-table>([]x:1 0 3f)</kdb-table> will have a blank 2nd row rather than displaying 0.

Is there a way to differentiate between null and zero?

quintanar401 commented 8 years ago

Yes, I always forget that JS treats many things as false. null and 0 - fixed. I think it is not possible to get undefined.