@@ -15,7 +15,7 @@ import FormField from 'components/Settings/FormField';
1515import AddItemIcon from 'assets/images/settings-add-item.svg' ;
1616import { SettingBannerV2 as Collapse } from 'components/Settings/SettingsBanner' ;
1717import { PrimaryButton , SecondaryButton } from 'topcoder-react-ui-kit' ;
18- import InputSelect from 'components/InputSelect ' ;
18+ import FormInputSelect from 'components/Settings/FormInputSelect ' ;
1919import { toastr } from 'react-redux-toastr' ;
2020import ConfirmationModal from '../../ConfirmationModal' ;
2121import DeviceList from './List' ;
@@ -299,14 +299,14 @@ export default class Devices extends ConsentComponent {
299299 getManufacturers,
300300 } = this . props ;
301301
302- const newDevice = { deviceType : val } ;
302+ const newDevice = { deviceType : val . name } ;
303303 newDevice . manufacturer = '' ;
304304 newDevice . model = '' ;
305305 newDevice . operatingSystem = '' ;
306306 this . setState ( { newDevice, isSubmit : false } ) ;
307307
308308 // preload manufacturers
309- getManufacturers ( val ) ;
309+ getManufacturers ( val . name ) ;
310310 }
311311
312312 /**
@@ -319,7 +319,7 @@ export default class Devices extends ConsentComponent {
319319 } = this . props ;
320320 const { newDevice : device } = this . state ;
321321 const newDevice = { ..._ . pick ( device , [ 'deviceType' ] ) } ;
322- newDevice . manufacturer = val ;
322+ newDevice . manufacturer = val . name ;
323323 newDevice . model = '' ;
324324 newDevice . operatingSystem = '' ;
325325 this . setState ( { newDevice, isSubmit : false } ) ;
@@ -338,7 +338,7 @@ export default class Devices extends ConsentComponent {
338338 } = this . props ;
339339 const { newDevice : device } = this . state ;
340340 const newDevice = { ..._ . pick ( device , [ 'deviceType' , 'manufacturer' ] ) } ;
341- newDevice . model = val ;
341+ newDevice . model = val . model ;
342342 newDevice . operatingSystem = '' ;
343343 this . setState ( { newDevice, isSubmit : false } ) ;
344344
@@ -353,7 +353,7 @@ export default class Devices extends ConsentComponent {
353353 onUpdateOs ( val ) {
354354 const { newDevice : device } = this . state ;
355355 const newDevice = { ..._ . pick ( device , [ 'deviceType' , 'manufacturer' , 'model' ] ) } ;
356- newDevice . operatingSystem = val ;
356+ newDevice . operatingSystem = val . operatingSystem ;
357357 this . setState ( { newDevice, isSubmit : false } ) ;
358358 }
359359
@@ -462,6 +462,7 @@ export default class Devices extends ConsentComponent {
462462 ? deviceTrait . traits . data . slice ( ) : [ ] ;
463463 const { newDevice } = this . state ;
464464 const canModifyTrait = ! this . props . traitRequestCount ;
465+
465466 return (
466467 < React . Fragment >
467468 {
@@ -497,7 +498,7 @@ export default class Devices extends ConsentComponent {
497498 < div styleName = "form-body" >
498499 < form styleName = "device-form" noValidate autoComplete = "off" >
499500 < FormField label = "Device Type *" style = { { flex : '0 0 100%' } } >
500- < InputSelect
501+ < FormInputSelect
501502 name = "Device Type"
502503 options = { types }
503504 value = { newDevice . deviceType }
@@ -520,7 +521,7 @@ export default class Devices extends ConsentComponent {
520521 </ FormField >
521522
522523 < FormField label = "Manufacturer" style = { { flex : '0 0 100%' } } >
523- < InputSelect
524+ < FormInputSelect
524525 name = "manufacturer"
525526 options = { manufacturers }
526527 value = { newDevice . manufacturer }
@@ -534,7 +535,7 @@ export default class Devices extends ConsentComponent {
534535 </ FormField >
535536
536537 < FormField label = "Model" style = { { flex : '0 0 100%' } } >
537- < InputSelect
538+ < FormInputSelect
538539 name = "model"
539540 options = { models }
540541 onChange = { this . onUpdateModel }
@@ -551,7 +552,7 @@ export default class Devices extends ConsentComponent {
551552 </ FormField >
552553
553554 < FormField label = "Operating System" style = { { flex : '0 0 100%' } } >
554- < InputSelect
555+ < FormInputSelect
555556 name = "Operating System"
556557 options = { oses }
557558 onChange = { this . onUpdateOs }
0 commit comments