@react-types/autocomplete 3.0.0-nightly.3679 → 3.0.0-nightly.3685

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/src/index.d.ts +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/autocomplete",
3
- "version": "3.0.0-nightly.3679+62d779c7f",
3
+ "version": "3.0.0-nightly.3685+97ff9f95d",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,9 +9,9 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/combobox": "3.5.6-nightly.3679+62d779c7f",
13
- "@react-types/searchfield": "3.0.0-nightly.1979+62d779c7f",
14
- "@react-types/shared": "3.0.0-nightly.1979+62d779c7f"
12
+ "@react-types/combobox": "3.5.6-nightly.3685+97ff9f95d",
13
+ "@react-types/searchfield": "3.0.0-nightly.1985+97ff9f95d",
14
+ "@react-types/shared": "3.0.0-nightly.1985+97ff9f95d"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
@@ -19,5 +19,5 @@
19
19
  "publishConfig": {
20
20
  "access": "public"
21
21
  },
22
- "gitHead": "62d779c7f82a9c1e88b912850af342af8ea5156f"
22
+ "gitHead": "97ff9f95d91befaf87251e52ea484f81daae8f3a"
23
23
  }
package/src/index.d.ts CHANGED
@@ -33,6 +33,14 @@ export interface SearchAutocompleteProps<T> extends CollectionBase<T>, Omit<Aria
33
33
  * @default 'input'
34
34
  */
35
35
  menuTrigger?: MenuTriggerAction,
36
+ /** Handler that is called when the SearchAutocomplete is submitted.
37
+ *
38
+ * A `value` will be passed if the submission is a custom value (e.g. a user types then presses enter).
39
+ * If the input is a selected item, `value` will be null.
40
+ *
41
+ * A `key` will be passed if the submission is a selected item (e.g. a user clicks or presses enter on an option).
42
+ * If the input is a custom value, `key` will be null.
43
+ */
36
44
  onSubmit?: (value: string | null, key: Key | null) => void,
37
45
  /** An icon to display at the start of the input. */
38
46
  icon?: ReactElement | null