File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/coreui-react/src/components/toast Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export interface CToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title
4444 /**
4545 * @ignore
4646 */
47- key ?: number
47+ innerKey ?: number | string
4848 /**
4949 * Callback fired when the component requests to be closed.
5050 */
@@ -76,7 +76,7 @@ export const CToast = forwardRef<HTMLDivElement, CToastProps>(
7676 color,
7777 delay = 5000 ,
7878 index,
79- key ,
79+ innerKey ,
8080 visible = false ,
8181 onClose,
8282 onShow,
@@ -143,7 +143,7 @@ export const CToast = forwardRef<HTMLDivElement, CToastProps>(
143143 onMouseEnter = { ( ) => clearTimeout ( timeout . current ) }
144144 onMouseLeave = { ( ) => _autohide ( ) }
145145 { ...rest }
146- key = { key }
146+ key = { innerKey }
147147 ref = { forkedRef }
148148 >
149149 { children }
@@ -163,7 +163,10 @@ CToast.propTypes = {
163163 color : colorPropType ,
164164 delay : PropTypes . number ,
165165 index : PropTypes . number ,
166- key : PropTypes . number ,
166+ innerKey : PropTypes . oneOfType ( [
167+ PropTypes . number ,
168+ PropTypes . string
169+ ] ) ,
167170 onClose : PropTypes . func ,
168171 onShow : PropTypes . func ,
169172 visible : PropTypes . bool ,
You can’t perform that action at this time.
0 commit comments