diff --git a/src/hooks/MIGRATION_V9.md b/src/hooks/MIGRATION_V9.md new file mode 100644 index 00000000..3b5f24c8 --- /dev/null +++ b/src/hooks/MIGRATION_V9.md @@ -0,0 +1,34 @@ +# Migration from v8 to v9 + +Downshift v8 receives a list of breaking changes, which are necessary to improve +both the user and the developer experience. The changes are only affecting the +hooks and are detailed below. + +## Table of Contents + + + + +- [onChangeTypescriptImprovements](#onchangetypescriptimprovements) + + + +## onChange Typescript Improvements + +The handlers below have their types improved to reflect that they will always +get called with their corresponding state prop: + +- useCombobox + - onSelectedItemChange: selectedItem is non optional + - onIsOpenChange: isOpen is non optional + - onHighlightedIndexChange: highlightedIndex is non optional + +- useSelect + - onSelectedItemChange: selectedItem is non optional + - onIsOpenChange: isOpen is non optional + - onHighlightedIndexChange: highlightedIndex is non optional + - onInputValueChange: inputValue is non optional + +- useMultipleSelection + - onActiveIndexChange: activeIndex is non optional + - onSelectedItemsChange: selectedItems is non optional \ No newline at end of file