Eureka: DecimalRow without any format?

Created on 19 Jan 2016  路  2Comments  路  Source: xmartlabs/Eureka

How can I use a DecimalRow() without any formatter?

Currently when I use the following code:

<<< DecimalRow(){
    $0.tag = "TAG"
}

and it still convert my value 3359.3 to 3,359.60. How can I just let it output 3359.3? Thanks!

formatters DecimalRow question

All 2 comments

@eflyjason

<<< DecimalRow(){
    $0.formatter = nil
    $0.tag = "TAG"
}

Alternatively if you can use a TextRow and change the keyboard options:

<<< TextRow() {
$0.tag = "TAG"
}
.cellSetup { cell, _ in
cell.textField.autocorrectionType = .Default
cell.textField.autocapitalizationType = .Sentences
cell.textField.keyboardType = .Default
}

Notice that TextRow type is String whereas DecimalRow type is Double.

related to #264 and #214

I had this same issue and fixed it this way:

        row.validationOptions = ValidationOptions.validatesOnDemand
        row.useFormatterOnDidBeginEditing = false
        row.useFormatterDuringInput = false
        row.formatter = nil
Was this page helpful?
0 / 5 - 0 ratings

Related issues

geoffmacd picture geoffmacd  路  16Comments

funkenstrahlen picture funkenstrahlen  路  19Comments

lazymodifier picture lazymodifier  路  15Comments

geoherna picture geoherna  路  14Comments

sash picture sash  路  14Comments