Skip to content

Commit ca424da

Browse files
committed
Rename street group component, should fix #103
1 parent b140ce8 commit ca424da

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Block/Checkout/AttributeMerger.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ class AttributeMerger extends BaseAttributeMerger
1818
* @param string $dataScopePrefix
1919
* @return array
2020
*/
21-
protected function getMultilineFieldConfig($attributeCode, array $attributeConfig, $providerName, $dataScopePrefix)
21+
protected function getMultilineFieldConfig($attributeCode, array $attributeConfig, $providerName, $dataScopePrefix): array
2222
{
2323
$config = parent::getMultilineFieldConfig($attributeCode, $attributeConfig, $providerName, $dataScopePrefix);
2424

2525
if ($attributeCode === 'street') {
26-
$config['component'] = 'Flekto_Postcode/js/form/components/street';
26+
// NB. collection component must end in '/group' or Magento's shipping rates validator will break.
27+
$config['component'] = 'Flekto_Postcode/js/form/components/street/group';
2728
$config['config']['template'] = 'Flekto_Postcode/group/street';
2829
}
2930

view/frontend/web/js/form/components/street.js renamed to view/frontend/web/js/form/components/street/group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ define([
2323

2424
asyncSetValues: function (...args) {
2525
const lastChildIndex = this.initChildCount - 1,
26-
values = args.slice(0, lastChildIndex);
26+
values = args.slice(0, lastChildIndex);
2727

2828
// Join remaining args for last or single child.
2929
values.push(args.slice(lastChildIndex).join(' ').trim());

0 commit comments

Comments
 (0)