properly handle link press events

This commit is contained in:
Hailey
2024-01-12 22:50:15 -08:00
parent 2802902c69
commit 5216464458
4 changed files with 97 additions and 46 deletions
@@ -10,7 +10,9 @@ public class ExpoSelectableTextModule: Module {
Prop("segments") { (view: ExpoSelectableTextView, prop: String) in
// Convert the JSON to segments
if let data = prop.data(using: .utf8) {
print("first")
if let segments = try? JSONDecoder().decode(TextSegments.self, from: data) {
print("second")
view.segments = segments.segments
}
}
@@ -27,6 +29,10 @@ public class ExpoSelectableTextModule: Module {
Prop("selectable") { (view: ExpoSelectableTextView, prop: Bool) in
view.textView.isSelectable = prop
}
Prop("children") { (view: ExpoSelectableTextView, prop: JavaScriptValue) in
print(prop)
}
}
}
}