File tree 1 file changed +7
-4
lines changed
packages/coreui-react/src/components/toast
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
44
44
/**
45
45
* @ignore
46
46
*/
47
- key ?: number
47
+ innerKey ?: number | string
48
48
/**
49
49
* Callback fired when the component requests to be closed.
50
50
*/
@@ -76,7 +76,7 @@ export const CToast = forwardRef<HTMLDivElement, CToastProps>(
76
76
color,
77
77
delay = 5000 ,
78
78
index,
79
- key ,
79
+ innerKey ,
80
80
visible = false ,
81
81
onClose,
82
82
onShow,
@@ -143,7 +143,7 @@ export const CToast = forwardRef<HTMLDivElement, CToastProps>(
143
143
onMouseEnter = { ( ) => clearTimeout ( timeout . current ) }
144
144
onMouseLeave = { ( ) => _autohide ( ) }
145
145
{ ...rest }
146
- key = { key }
146
+ key = { innerKey }
147
147
ref = { forkedRef }
148
148
>
149
149
{ children }
@@ -163,7 +163,10 @@ CToast.propTypes = {
163
163
color : colorPropType ,
164
164
delay : PropTypes . number ,
165
165
index : PropTypes . number ,
166
- key : PropTypes . number ,
166
+ innerKey : PropTypes . oneOfType ( [
167
+ PropTypes . number ,
168
+ PropTypes . string
169
+ ] ) ,
167
170
onClose : PropTypes . func ,
168
171
onShow : PropTypes . func ,
169
172
visible : PropTypes . bool ,
You can’t perform that action at this time.
0 commit comments