Files
streamyfin/modules/tv-search/ios/TvSearchModule.swift
Fredrik Burmester e044859aaf feat(tv): native tvOS search field via SwiftUI .searchable
Add a local `tv-search` Expo module that hosts SwiftUI's `.searchable`
in a UIHostingController (adapted from expo-tvos-search, minus its native
results grid). It emits typed text to React Native so the existing search
pipeline and custom TV results grid are reused. Handles the RN-tvOS remote
gesture release needed for keyboard input on device.

Wire it into TVSearchPage as a sticky header above the scrollable results,
with a TVFocusGuideView bridge so focus can move from the tab bar into the
native search field.
2026-05-30 16:54:35 +02:00

16 lines
328 B
Swift

import ExpoModulesCore
public class TvSearchModule: Module {
public func definition() -> ModuleDefinition {
Name("TvSearchModule")
View(TvSearchView.self) {
Events("onChangeText")
Prop("placeholder") { (view: TvSearchView, value: String?) in
view.setPlaceholder(value ?? "")
}
}
}
}