File tree Expand file tree Collapse file tree
src/custom/UserSearchField Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ interface UserSearchFieldProps {
3333 setUsersData : React . Dispatch < React . SetStateAction < User [ ] > > ;
3434 label ?: string ;
3535 setDisableSave ?: ( disable : boolean ) => void ;
36- // Deprecated: remove notify controls from embedded contexts (e.g., audit filters)
3736 handleNotifyPref ?: ( ) => void ;
3837 notifyUpdate ?: boolean ;
38+ showNotifyCheckbox ?: boolean ;
3939 isCreate ?: boolean ;
4040 searchType ?: string ;
4141 disabled ?: boolean ;
@@ -54,6 +54,7 @@ const UserSearchField: React.FC<UserSearchFieldProps> = ({
5454 setDisableSave,
5555 handleNotifyPref,
5656 notifyUpdate,
57+ showNotifyCheckbox = true ,
5758 isCreate,
5859 searchType,
5960 disabled = false ,
@@ -230,7 +231,23 @@ const UserSearchField: React.FC<UserSearchFieldProps> = ({
230231 </ li >
231232 ) }
232233 />
233- { /* Notify checkbox removed */ }
234+ { showNotifyCheckbox && ! isCreate && handleNotifyPref && (
235+ < FormGroup row = { true } >
236+ < div style = { { display : 'flex' , flexWrap : 'nowrap' } } >
237+ < FormControlLabel
238+ control = {
239+ < Checkbox
240+ checked = { notifyUpdate }
241+ onChange = { handleNotifyPref }
242+ name = "notify"
243+ color = "primary"
244+ />
245+ }
246+ label = { `Notify ${ searchType } of membership change` }
247+ />
248+ </ div >
249+ </ FormGroup >
250+ ) }
234251 < Box
235252 sx = { {
236253 display : 'flex' ,
You can’t perform that action at this time.
0 commit comments