Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let fieldsUpdatess = fields
- .compactMap { $0 as? TextFieldViewModel }
- .map { field in
- field.didFinishEditingSubject
- Driver.combineLatest(field.text, field.isValid)
- .filter { $1 }
- .do(onNext: {
- address.value.update(field.fieldType, with: $0.0)
- if let copyTo = field.copyTo {
- address.value.update(copyTo, with: $0.0)
- }
- }).mapToVoid()
- // field
- // .text
- // .do(onNext: {
- // address.value.update(field.fieldType, with: $0)
- // if let copyTo = field.copyTo {
- // address.value.update(copyTo, with: $0)
- // }
- // })
- // .alwaysMap(to: ())
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement