SplitRow icon indicating copy to clipboard operation
SplitRow copied to clipboard

Setting keyboardType

Open primeviltom opened this issue 4 years ago • 2 comments

Hi there,

I'm having an issue setting the keyboard type when using a TextRow contained within a splitRow..

For example, the keyboard type in the following is not being observed:

        <<< SplitRow<TextRow, TextRow>() {
            $0.tag = "SplitAddressLine2"
            $0.rowLeftPercentage = 0.7
            $0.hidden = true
            $0.rowLeft = TextRow() {
                $0.placeholder = "Town" //Working
                $0.tag = "town"
            }
            
            $0.rowRight = TextRow() {
                $0.tag = "postcode"
                $0.cell.textField.keyboardType = .numberPad //Not working
                $0.placeholder = "Postcode" //Is working
            }.cellSetup {cell, row in
                cell.textField.keyboardType = .numberPad //Also Not working
            }
        }

The placeholder text is being set correctly, but the keyboard type is not. Where in a basic TextRow, outside of a SplitRow, the keyboard type is being set correctly. e.g.

                <<< TextRow() { row in
                    row.placeholder = "TEST"
                    row.cell.textField.keyboardType = .numberPad //Works
                }

How can I get the TextRow to show the correct keyboardType?

primeviltom avatar Nov 01 '20 23:11 primeviltom

Unfortunately I no longer have access to a Mac. Maybe @kamerc can help out?

marbetschar avatar Nov 09 '20 08:11 marbetschar

@primeviltom you will need to use the Eureka type of ZipCodeRow instead of TextRow. Here are more details on the different rows: https://github.com/xmartlabs/eureka#row-catalog

kamerc avatar Nov 09 '20 16:11 kamerc