Skip to content

Commit

Permalink
Update docs for Custom Select props (#5776)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebennett88 committed Oct 17, 2023
1 parent b53e647 commit 2f94e8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/pages/typescript/index.tsx
Expand Up @@ -91,7 +91,12 @@ The \`actionMeta\` parameter is optional. \`ActionMeta\` is a union that is disc
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

0 comments on commit 2f94e8d

Please sign in to comment.