Ticket #2618 (closed defect: wontfix)
FilteringTable incorrectly identifies dataType for columns in fillCell method
| Reported by: | eric.foster-johnson@… | Owned by: | ttrenka |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | Dijit | Version: | 0.4.2 |
| Severity: | normal | Keywords: | FilteringTable widgets |
| Cc: |
Description
(Note this has nothing to do with numeric formatting. Instead, this is an issue with identifying the column is of a numeric dataType.)
In the fillCell function in FilteringTable?.js in Dojo 0.4.2 at approx. line 733, you see the following construct (unchanged from 0.4.1):
} else if ("Number number int Integer float Float".indexOf(meta.getType())>-1){
The problem here is that if you specify a dataType="Number" on the column, meta.getType() returns the function Number(), not a text string. Hence, this else block never gets executed and the code does not correctly identify that the column has a dataType of "Number".
If I replace the line with:
} else if (meta.getType() == Number) {
Then the block will get executed.