]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * The Search field creates an HTML5 search input and is usually created inside a form. Because it creates an HTML\r | |
3 | * search input type, the visual styling of this input is slightly different to normal text input controls (the corners\r | |
4 | * are rounded), though the virtual keyboard displayed by the operating system is the standard keyboard control.\r | |
5 | *\r | |
6 | * As with all other form fields, the search field gains a "clear" button that appears whenever there\r | |
7 | * is text entered into the form, and which removes that text when tapped.\r | |
8 | *\r | |
9 | * @example\r | |
10 | * Ext.create('Ext.form.Panel', {\r | |
11 | * fullscreen: true,\r | |
12 | * items: [\r | |
13 | * {\r | |
14 | * xtype: 'fieldset',\r | |
15 | * title: 'Search',\r | |
16 | * items: [\r | |
17 | * {\r | |
18 | * xtype: 'searchfield',\r | |
19 | * label: 'Query',\r | |
20 | * name: 'query'\r | |
21 | * }\r | |
22 | * ]\r | |
23 | * }\r | |
24 | * ]\r | |
25 | * });\r | |
26 | *\r | |
27 | * Or on its own, outside of a form:\r | |
28 | *\r | |
29 | * Ext.create('Ext.field.Search', {\r | |
30 | * label: 'Search:',\r | |
31 | * value: 'query'\r | |
32 | * });\r | |
33 | *\r | |
34 | * Because search field inherits from {@link Ext.field.Text textfield} it gains all of the functionality that text\r | |
35 | * fields provide, including getting and setting the value at runtime, validations and various events that are fired\r | |
36 | * as the user interacts with the component. Check out the {@link Ext.field.Text} docs to see the additional\r | |
37 | * functionality available.\r | |
38 | */\r | |
39 | Ext.define('Ext.field.Search', {\r | |
40 | extend: 'Ext.field.Text',\r | |
41 | xtype: 'searchfield',\r | |
42 | alternateClassName: 'Ext.form.Search',\r | |
43 | \r | |
44 | config: {\r | |
45 | /**\r | |
46 | * @cfg\r | |
47 | * @inheritdoc\r | |
48 | */\r | |
49 | component: {\r | |
50 | type: 'search'\r | |
51 | },\r | |
52 | \r | |
53 | /**\r | |
54 | * @cfg\r | |
55 | * @inheritdoc\r | |
56 | */\r | |
57 | ui: 'search'\r | |
58 | }\r | |
59 | });\r |