SearchField
Provides native search input and search-specific behavior.
<SearchField ... />
Overview
This component is backed by the platform control or container. Prefer its XML tag in an .etlua template; keep view-tree construction out of controllers.
Topics
Properties
| Name | Type | Required | Description |
|---|---|---|---|
accessibilityLabel |
value | optional | Component-specific setting passed to the native control. |
controlSize |
string | optional | Component-specific setting passed to the native control. |
defaultFocus |
boolean | optional | Receives keyboard focus when its sheet is presented (SwiftUI .defaultFocus). |
onChange |
function | optional | Callback invoked when the value changes. |
onCommand |
function | optional | Callback invoked for the corresponding keyboard command. |
placeholder |
string | optional | Component-specific setting passed to the native control. |
value |
table | optional | Current selected, edited, or measured value. |
Example
<SearchField />
Platform notes
- AppKit uses the AppKit implementation. UIKit uses the UIKit implementation.
Source: lua/embedded/AppKit.lua:1198 (AppKit.SearchField)