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

fpena picture fpena  路  3Comments

pteasima picture pteasima  路  3Comments

smileatom picture smileatom  路  3Comments

jaylyerly picture jaylyerly  路  3Comments

allanrojas picture allanrojas  路  3Comments