Files
NativeScript/apps/tests/ui/search-bar/search-bar-tests.ts
2015-03-03 10:34:40 +02:00

23 lines
823 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import observable = require("data/observable");
// <snippet module="ui/search-bar" title="search-bar">
// # SearchBar
// Using the SearchBar requires the "ui/search-bar" module.
// ``` JavaScript
import searchBarModule = require("ui/search-bar");
// ```
// </snippet>
export function test_DummyTestForSnippetOnly() {
// <snippet module="ui/search-bar" title="search-bar">
// ### Searching
// ``` JavaScript
var searchBar = new searchBarModule.SearchBar();
searchBar.on(searchBarModule.knownEvents.submit, function (args: observable.EventData) {
console.log("Search for " + (<searchBarModule.SearchBar>args.object).text);
});
searchBar.on(searchBarModule.knownEvents.clear, function (args: observable.EventData) {
console.log("Clear");
});
// ```
// </snippet>
}