File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
frontend/src/pages/performers/performerForm Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,9 @@ const PerformerForm: FC<PerformerProps> = ({
185185 } ) ;
186186
187187 const [ activeTab , setActiveTab ] = useState ( "personal" ) ;
188- const [ updateAliases , setUpdateAliases ] = useState < boolean > ( ) ;
188+ const [ updateAliases , setUpdateAliases ] = useState < boolean > (
189+ options ?. set_modify_aliases ?? true
190+ ) ;
189191 const [ file , setFile ] = useState < File | undefined > ( ) ;
190192
191193 const fieldData = watch ( ) ;
@@ -262,7 +264,7 @@ const PerformerForm: FC<PerformerProps> = ({
262264 )
263265 performerData . breast_type = BreastTypeEnum . NA ;
264266
265- callback ( performerData , data . note , updateAliases ?? false , data . id ) ;
267+ callback ( performerData , data . note , updateAliases , data . id ) ;
266268 } ;
267269
268270 const countryObj = [
@@ -340,8 +342,7 @@ const PerformerForm: FC<PerformerProps> = ({
340342 < Form . Check
341343 id = "update-modify-aliases"
342344 checked = { updateAliases }
343- defaultChecked = { options ?. set_modify_aliases ?? false }
344- onChange = { ( ) => setUpdateAliases ( ! updateAliases ) }
345+ onChange = { ( ) => setUpdateAliases ( ( prev ) => ! prev ) }
345346 label = "Set unset performance aliases to old name"
346347 className = "d-inline-block"
347348 />
You can’t perform that action at this time.
0 commit comments