Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebennett88 authored Oct 26, 2024
2 parents 37ca106 + a8b8f43 commit dab2551
Show file tree
Hide file tree
Showing 16 changed files with 539 additions and 88 deletions.
9 changes: 7 additions & 2 deletions docs/pages/typescript/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,19 @@ const onChange = (option: readonly Option[], actionMeta: ActionMeta<Option>) =>
}
~~~
The \`actionMeta\` parameter is optional. \`ActionMeta\` is a union that is discriminated on the \`action\` type. Take a look at at [types.ts](https://github.com/JedWatson/react-select/blob/master/packages/react-select/src/types.ts) in the source code to see its full definition.
The \`actionMeta\` parameter is optional. \`ActionMeta\` is a union that is discriminated on the \`action\` type. Take a look at [types.ts](https://github.com/JedWatson/react-select/blob/master/packages/react-select/src/types.ts) in the source code to see its full definition.
## Custom Select props
You can use module augmentation to add custom props to the \`Select\` prop types:
~~~jsx
declare module 'react-select/dist/declarations/src/Select' {
import type {} from 'react-select/base';
// This import is necessary for module augmentation.
// It allows us to extend the 'Props' interface in the 'react-select/base' module
// and add our custom property 'myCustomProp' to it.
declare module 'react-select/base' {
export interface Props<
Option,
IsMulti extends boolean,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
"jest-in-case": "^1.0.2",
"prettier": "^2.2.1",
"style-loader": "^0.23.1",
"typescript": "^4.1.3"
"typescript": "^4.1.3",
"user-agent-data-types": "^0.4.2"
},
"scripts": {
"build": "preconstruct build",
Expand Down
22 changes: 22 additions & 0 deletions packages/react-select/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# react-select

## 5.8.1

### Patch Changes

- [`dd740ced`](https://github.com/JedWatson/react-select/commit/dd740cedb29c810a89da4445d4864cd7e63d3aaf) [#5960](https://github.com/JedWatson/react-select/pull/5960) Thanks [@leonaves](https://github.com/leonaves)! - No longer send pop-value action when multi-select is empty. This correctly resolves typings with that event, where removedValue cannot be undefined.

## 5.8.0

### Minor Changes

- [`884f1c42`](https://github.com/JedWatson/react-select/commit/884f1c42549faad7cb210169223b427ad6f0c9fd) [#5758](https://github.com/JedWatson/react-select/pull/5758) Thanks [@Ke1sy](https://github.com/Ke1sy)! - 1. Added 'aria-activedescendant' for input and functionality to calculate it;

2. Added role 'option' and 'aria-selected' for option;
3. Added role 'listbox' for menu;
4. Added tests for 'aria-activedescendant';
5. Changes in aria-live region:

- the instructions how to use select will be announced only one time when user focuses the input for the first time.
- instructions for menu or selected value will be announced only once after focusing them.
- removed aria-live for focused option because currently with correct aria-attributes it will be announced by screenreader natively as well as the status of this option (active or disabled).
- separated ariaContext into ariaFocused, ariaResults, ariaGuidance to avoid announcing redundant information and higlight only current change.

## 5.7.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-select/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-select",
"version": "5.7.7",
"version": "5.8.1",
"description": "A Select control built with and for ReactJS",
"main": "dist/react-select.cjs.js",
"module": "dist/react-select.esm.js",
Expand Down
Loading

0 comments on commit dab2551

Please sign in to comment.