From 2f94e8d228ea32dbd0faa1f7685a67b74c70420f Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Tue, 17 Oct 2023 11:17:55 +1100 Subject: [PATCH] Update docs for Custom Select props (#5776) --- docs/pages/typescript/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/pages/typescript/index.tsx b/docs/pages/typescript/index.tsx index ae1f1b4f1c..01968c279e 100644 --- a/docs/pages/typescript/index.tsx +++ b/docs/pages/typescript/index.tsx @@ -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,