File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ export type CustomTagProps = {
6868 onClose : ( event ?: React . MouseEvent < HTMLElement , MouseEvent > ) => void ;
6969 closable : boolean ;
7070 isMaxTag : boolean ;
71+ index : number | undefined ;
7172} ;
7273
7374export interface BaseSelectRef {
Original file line number Diff line number Diff line change @@ -136,11 +136,13 @@ const SelectSelector: React.FC<SelectorProps> = (props) => {
136136 onPreventMouseDown ( e ) ;
137137 onToggleOpen ( ! open ) ;
138138 } ;
139+ const index = values . findIndex ( ( item ) => item . value === value ) ;
139140 return (
140141 < span onMouseDown = { onMouseDown } >
141142 { tagRender ( {
142143 label : content ,
143144 value,
145+ index : index >= 0 ? index : undefined ,
144146 disabled : itemDisabled ,
145147 closable,
146148 onClose,
You can’t perform that action at this time.
0 commit comments