mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
25 lines
771 B
TypeScript
25 lines
771 B
TypeScript
import definition = require("ui/search-bar");
|
|
import view = require("ui/core/view");
|
|
import dependencyObservable = require("ui/core/dependency-observable");
|
|
import proxy = require("ui/core/proxy");
|
|
|
|
export module knownEvents {
|
|
export var submit = "submit";
|
|
export var clear = "clear";
|
|
}
|
|
|
|
export class SearchBar extends view.View implements definition.SearchBar {
|
|
|
|
public static textProperty = new dependencyObservable.Property(
|
|
"text",
|
|
"SearchBar",
|
|
new proxy.PropertyMetadata("", dependencyObservable.PropertyMetadataSettings.AffectsLayout)
|
|
);
|
|
|
|
get text(): string {
|
|
return this._getValue(SearchBar.textProperty);
|
|
}
|
|
set text(value: string) {
|
|
this._setValue(SearchBar.textProperty, value);
|
|
}
|
|
}
|