Opened 13 years ago
Closed 7 years ago
#8725 closed task (patchwelcome)
MappedTextBox: rethink filter() method
Reported by: | bill | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.13 |
Component: | Dijit - Form | Version: | 1.3.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Currently, for widgets that mixin MappedTextBox, the filter() method has two purposes
- corrections on the displayed value, such as trimming whitespace
- corrections to the hidden value, such as (for NumberTextBox) converting null to NaN
This makes the code confusing to understand, as well as requiring branching inside functions like NumberTextBox.filter based on the argument's data type (number or string).
Further, there's a potential issue when the hidden value and displayed value are both strings, in that a FilteringSelect (for example) with propercase=true might convert a key like "CA" into "Ca", which is not appropriate.
Anyway, for 2.0 should think about splitting filter() into two methods (maybe filter() and filterHiddenValue()), the latter of which is only used for MappedTextBox subclasses.
Change History (4)
comment:1 Changed 11 years ago by
Component: | Dijit → Dijit - Form |
---|---|
Owner: | set to Douglas Hays |
comment:2 Changed 8 years ago by
Owner: | Douglas Hays deleted |
---|---|
Status: | new → assigned |
comment:3 Changed 8 years ago by
Status: | assigned → open |
---|
comment:4 Changed 7 years ago by
Milestone: | 2.0 → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | open → closed |
Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.