Correct entity dropdown
This commit is contained in:
parent
97a2ba15d4
commit
4b60be2926
|
|
@ -334,7 +334,9 @@ class _EntityDropdownState extends State<EntityDropdown> {
|
|||
},
|
||||
onChanged: (value) {
|
||||
_filter = value;
|
||||
if (hasValue) {
|
||||
widget.onSelected(null);
|
||||
}
|
||||
},
|
||||
suffixIconButton: iconButton,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -145,22 +145,23 @@ class _CompanyGatewayEditState extends State<CompanyGatewayEdit>
|
|||
children: <Widget>[
|
||||
if (companyGateway.isNew)
|
||||
EntityDropdown(
|
||||
autofocus: true,
|
||||
entityType: EntityType.gateway,
|
||||
entityList:
|
||||
memoizedGatewayList(state.staticState.gatewayMap),
|
||||
labelText: localization.provider,
|
||||
entityId: companyGateway.gatewayId,
|
||||
onSelected: (SelectableEntity gateway) {
|
||||
gateway ??= GatewayEntity();
|
||||
viewModel.onChanged(
|
||||
companyGateway.rebuild((b) => b
|
||||
..feesAndLimitsMap[(gateway as GatewayEntity)
|
||||
..feesAndLimitsMap[((gateway ?? GatewayEntity())
|
||||
as GatewayEntity)
|
||||
.defaultGatewayTypeId ??
|
||||
kGatewayTypeCreditCard] =
|
||||
FeesAndLimitsSettings(isEnabled: true)
|
||||
..gatewayId = gateway.id
|
||||
..gatewayId = gateway?.id ?? ''
|
||||
..config = '{}'
|
||||
..label = gateway.listDisplayName),
|
||||
..label = gateway?.listDisplayName ?? ''),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue