mirror of
https://github.com/chirpstack/chirpstack.git
synced 2024-12-20 21:53:11 +00:00
ui: Fix setting initial tagsMap in TenantForm.
This commit is contained in:
parent
3f86bf6e71
commit
b6d390b6ad
@ -12,18 +12,18 @@ interface IProps {
|
||||
}
|
||||
|
||||
function TenantForm(props: IProps) {
|
||||
const onFinish = (v: Tenant.AsObject) => {
|
||||
const values = Object.assign(props.initialValues.toObject(), v);
|
||||
const onFinish = (values: Tenant.AsObject) => {
|
||||
const v = Object.assign(props.initialValues.toObject(), values);
|
||||
|
||||
let tenant = new Tenant();
|
||||
tenant.setId(values.id);
|
||||
tenant.setName(values.name);
|
||||
tenant.setDescription(values.description);
|
||||
tenant.setCanHaveGateways(values.canHaveGateways);
|
||||
tenant.setMaxGatewayCount(values.maxGatewayCount);
|
||||
tenant.setMaxDeviceCount(values.maxDeviceCount);
|
||||
tenant.setPrivateGatewaysUp(values.privateGatewaysUp);
|
||||
tenant.setPrivateGatewaysDown(values.privateGatewaysDown);
|
||||
tenant.setId(v.id);
|
||||
tenant.setName(v.name);
|
||||
tenant.setDescription(v.description);
|
||||
tenant.setCanHaveGateways(v.canHaveGateways);
|
||||
tenant.setMaxGatewayCount(v.maxGatewayCount);
|
||||
tenant.setMaxDeviceCount(v.maxDeviceCount);
|
||||
tenant.setPrivateGatewaysUp(v.privateGatewaysUp);
|
||||
tenant.setPrivateGatewaysDown(v.privateGatewaysDown);
|
||||
|
||||
// tags
|
||||
for (const elm of v.tagsMap) {
|
||||
|
Loading…
Reference in New Issue
Block a user