I have used Dynamic rows in product edit form.
Here is my DataProvider class code
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
use Magento\Framework\Stdlib\ArrayManager;
use Magento\Ui\Component\DynamicRows;
class Attachments extends AbstractModifier
{
private $arrayManager;
public function __construct(
) {
$this->arrayManager = $arrayManager;
}
$dynamicRows['arguments']['data']['config'] = [
'addButtonLabel' => __('Add Row'),
'componentType' => DynamicRows::NAME,
'itemTemplate' => 'record',
'renderDefaultRecord' => false,
'columnsHeader' => true,
'additionalClasses' => 'admin__field-wide',
'dataScope' => 'downloadable',
'deleteProperty'=> 'is_delete',
'deleteValue' => '1',
'currentPage' => 1,
'pageSize' => 10
];
return $this->arrayManager->set('children/record', $dynamicRows, $this->getRecord());
}
In the above code 'pageSize' is limiting the rows for one page, is there any way where we can set the limit to 10?
I am just looking for the code maximum we have to show only 10 rows, can we show any error message if it crosses 10?
Please someone guide me on this. Thank you!!