-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: DownloadableFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
Description
Preconditions (*)
- Magento 2.2
- Magento 2.3.0
Steps to reproduce (*)
- I need to add a column after Links Title column programatically.
- I have created a plugin of
\Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Links::modifyMeta()
namespace Webkul\Test\Plugin\Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier;
use Magento\Catalog\Model\Locator\LocatorInterface;
use Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Composite;
use Magento\Framework\Stdlib\ArrayManager;
use Magento\Ui\Component\Container;
use Magento\Ui\Component\Form;
/**
* Links class
*/
class Links
{
/**
*
* @param \Webkul\Test\Helper\Data $helper
*/
public function __construct(
LocatorInterface $locator,
ArrayManager $arrayManager,
\Webkul\Test\Helper\Data $helper
) {
$this->helper = $helper;
$this->locator = $locator;
$this->arrayManager = $arrayManager;
}
/**
* @see \Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Links::modifyMeta()
*/
public function afterModifyMeta (
\Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Links $subject,
$result
) {
$recordPath = $this->arrayManager->findPath('record', $result, null, 'children');
$result = $this->arrayManager->merge(
$recordPath.'/children',
$result,
array_merge(
[
'resolution' => $this->getResolutionColumn()
]
)
);
return $result;
}
/**
* @return array
*/
protected function getResolutionColumn()
{
$titleContainer['arguments']['data']['config'] = [
'componentType' => Container::NAME,
'formElement' => Container::NAME,
'component' => 'Magento_Ui/js/form/components/group',
'label' => __('Resolution'),
'showLabel' => false,
'dataScope' => '',
'sortOrder' => 15,
];
$titleField['arguments']['data']['config'] = [
'formElement' => Form\Element\Input::NAME,
'componentType' => Form\Field::NAME,
'dataType' => Form\Element\DataType\Text::NAME,
'dataScope' => 'resolution',
'validation' => [
'required-entry' => true,
],
];
return $this->arrayManager->set('children/resolution', $titleContainer, $titleField);
}
}
- After applying this code with sortOrder 15 on this custom column the links table columns misplaced
Expected result (*)
- This custom column must be insert after Title Column
Actual result (*)
Metadata
Metadata
Assignees
Labels
Component: DownloadableFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release