File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/app/device-model/device-model-edit Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export class DeviceModelEditComponent implements OnInit {
3131 controlledPropperties = [ ] ;
3232 categories = [ ] ;
3333 supportedUnits = new SupportedUnit ( ) ;
34- deviceFunctions = [ ] ;
34+ deviceFunctions : string [ ] = [ ] ;
3535 energyLimitationClass = new EnergyLimitationClass ( ) ;
3636 supportedProtocol = [ ] ;
3737
@@ -55,12 +55,14 @@ export class DeviceModelEditComponent implements OnInit {
5555 if ( deviceModelId ) {
5656 this . getDeviceModel ( deviceModelId ) ;
5757 }
58+ this . supportedUnits . units . sort ( ( a , b ) => a . name . localeCompare ( b . name ) ) ;
5859 }
5960
6061 mapEnumsToArray ( ) {
6162 this . controlledPropperties = Object . values ( ControlledPropperty ) ;
6263 this . categories = Object . values ( DeviceCategory ) ;
6364 this . deviceFunctions = Object . values ( DeviceFunction ) ;
65+ this . deviceFunctions . sort ( ( a : string , b : string ) => a . localeCompare ( b ) ) ;
6466 this . supportedProtocol = Object . values ( SupportedProtocol ) ;
6567 }
6668
You can’t perform that action at this time.
0 commit comments