Skip to content

Can`t delete row in dynamicRows component #8830

@MTheProgrammer

Description

@MTheProgrammer

Preconditions

  1. Magento 2.1.4

Steps to reproduce

  1. Go to Products -> Catalog
  2. Edit any product
  3. Click Add Attribute button
  4. Create new attribute of type Visual Swatch or Text Swatch
  5. Add swatch
  6. Try to Delete row with Bin icon

Expected result

  1. Row is deleted

Actual result

An error is produced in the js console output

Uncaught TypeError: $data.processingDeleteRecord is not a function
    at UiClass.eval (eval at createBindingsStringEvaluator (knockout.js:2624), <anonymous>:3:83)
    at HTMLButtonElement.<anonymous> (knockout.js:3863)
    at HTMLButtonElement.dispatch (jquery.js:4624)
    at HTMLButtonElement.elemData.handle (jquery.js:4292)

Solution

In Catalog/view/adminhtml/web/template/form/element/action-delete.html

update click: function(){ $data.processingDeleteRecord($parents); },
to click: function(){ $parent.processingDeleteRecord($record().index, $record.recordId); },

Metadata

Metadata

Assignees

Labels

Component: CatalogFixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasebug report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions