@@ -15,7 +15,7 @@ import FormField from 'components/Settings/FormField';
15
15
import AddItemIcon from 'assets/images/settings-add-item.svg' ;
16
16
import { SettingBannerV2 as Collapse } from 'components/Settings/SettingsBanner' ;
17
17
import { PrimaryButton , SecondaryButton } from 'topcoder-react-ui-kit' ;
18
- import InputSelect from 'components/InputSelect ' ;
18
+ import FormInputSelect from 'components/Settings/FormInputSelect ' ;
19
19
import { toastr } from 'react-redux-toastr' ;
20
20
import ConfirmationModal from '../../ConfirmationModal' ;
21
21
import DeviceList from './List' ;
@@ -299,14 +299,14 @@ export default class Devices extends ConsentComponent {
299
299
getManufacturers,
300
300
} = this . props ;
301
301
302
- const newDevice = { deviceType : val } ;
302
+ const newDevice = { deviceType : val . name } ;
303
303
newDevice . manufacturer = '' ;
304
304
newDevice . model = '' ;
305
305
newDevice . operatingSystem = '' ;
306
306
this . setState ( { newDevice, isSubmit : false } ) ;
307
307
308
308
// preload manufacturers
309
- getManufacturers ( val ) ;
309
+ getManufacturers ( val . name ) ;
310
310
}
311
311
312
312
/**
@@ -319,7 +319,7 @@ export default class Devices extends ConsentComponent {
319
319
} = this . props ;
320
320
const { newDevice : device } = this . state ;
321
321
const newDevice = { ..._ . pick ( device , [ 'deviceType' ] ) } ;
322
- newDevice . manufacturer = val ;
322
+ newDevice . manufacturer = val . name ;
323
323
newDevice . model = '' ;
324
324
newDevice . operatingSystem = '' ;
325
325
this . setState ( { newDevice, isSubmit : false } ) ;
@@ -338,7 +338,7 @@ export default class Devices extends ConsentComponent {
338
338
} = this . props ;
339
339
const { newDevice : device } = this . state ;
340
340
const newDevice = { ..._ . pick ( device , [ 'deviceType' , 'manufacturer' ] ) } ;
341
- newDevice . model = val ;
341
+ newDevice . model = val . model ;
342
342
newDevice . operatingSystem = '' ;
343
343
this . setState ( { newDevice, isSubmit : false } ) ;
344
344
@@ -353,7 +353,7 @@ export default class Devices extends ConsentComponent {
353
353
onUpdateOs ( val ) {
354
354
const { newDevice : device } = this . state ;
355
355
const newDevice = { ..._ . pick ( device , [ 'deviceType' , 'manufacturer' , 'model' ] ) } ;
356
- newDevice . operatingSystem = val ;
356
+ newDevice . operatingSystem = val . operatingSystem ;
357
357
this . setState ( { newDevice, isSubmit : false } ) ;
358
358
}
359
359
@@ -462,6 +462,7 @@ export default class Devices extends ConsentComponent {
462
462
? deviceTrait . traits . data . slice ( ) : [ ] ;
463
463
const { newDevice } = this . state ;
464
464
const canModifyTrait = ! this . props . traitRequestCount ;
465
+
465
466
return (
466
467
< React . Fragment >
467
468
{
@@ -497,7 +498,7 @@ export default class Devices extends ConsentComponent {
497
498
< div styleName = "form-body" >
498
499
< form styleName = "device-form" noValidate autoComplete = "off" >
499
500
< FormField label = "Device Type *" style = { { flex : '0 0 100%' } } >
500
- < InputSelect
501
+ < FormInputSelect
501
502
name = "Device Type"
502
503
options = { types }
503
504
value = { newDevice . deviceType }
@@ -520,7 +521,7 @@ export default class Devices extends ConsentComponent {
520
521
</ FormField >
521
522
522
523
< FormField label = "Manufacturer" style = { { flex : '0 0 100%' } } >
523
- < InputSelect
524
+ < FormInputSelect
524
525
name = "manufacturer"
525
526
options = { manufacturers }
526
527
value = { newDevice . manufacturer }
@@ -534,7 +535,7 @@ export default class Devices extends ConsentComponent {
534
535
</ FormField >
535
536
536
537
< FormField label = "Model" style = { { flex : '0 0 100%' } } >
537
- < InputSelect
538
+ < FormInputSelect
538
539
name = "model"
539
540
options = { models }
540
541
onChange = { this . onUpdateModel }
@@ -551,7 +552,7 @@ export default class Devices extends ConsentComponent {
551
552
</ FormField >
552
553
553
554
< FormField label = "Operating System" style = { { flex : '0 0 100%' } } >
554
- < InputSelect
555
+ < FormInputSelect
555
556
name = "Operating System"
556
557
options = { oses }
557
558
onChange = { this . onUpdateOs }
0 commit comments