Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Проблема с клонированием #351

Closed
Moonwolf45 opened this issue Aug 2, 2021 · 3 comments
Closed

Проблема с клонированием #351

Moonwolf45 opened this issue Aug 2, 2021 · 3 comments

Comments

@Moonwolf45
Copy link

Moonwolf45 commented Aug 2, 2021

Здравствйте. Вообщем, использую ваш плагин совместно, динамической формой "wbraganca/yii2-dynamicform" (это для справки) и вообщем когда при нажатии кнопки скопировать строку, он её копирует, но все данные сдвигаются вправо на один стобец, вот как это выглядит:
1

Ну вообщем как это можно решить, вот код формы:
`


                                <?= $form->field($ticket, "[{$index}]status")->checkbox(); ?>

                                <?= $form->field($ticket, "[{$index}]schedule")->widget(MultipleInput::class, [
                                    'min' => 1,
                                    'value' => $ticket->schedule,
                                    'cloneButton' => true,
                                    'columns' => [
                                        [
                                            'name'  => 'time',
                                            'type'  => TimePicker::class,
                                            'title' => Yii::t('app', 'Time'),
                                            'defaultValue' => date('H:' . 00),
                                            'options' => [
                                                'pluginOptions' => [
                                                    'showMeridian' => false,
                                                    'minuteStep' => 60
                                                ]
                                            ],
                                        ], [
                                            'name' => 'time_count_tickets',
                                            'title' => Yii::t('app', 'Time count tickets'),
                                            'defaultValue' => 6,
                                            'enableError' => true,
                                            'options' => [
                                                'type' => 'number',
                                                'class' => 'input-priority',
                                                'min' => 6
                                            ]
                                        ], [
                                            'name' => 'price_adults',
                                            'type'  => NumberControl::class,
                                            'title' => Yii::t('app', 'Price adults'),
                                            'defaultValue' => 1,
                                            'enableError' => true,
                                            'options' => [
                                                'class' => 'input-priority'
                                            ]
                                        ], [
                                            'name' => 'price_stud',
                                            'type'  => NumberControl::class,
                                            'title' => Yii::t('app', 'Price stud'),
                                            'defaultValue' => 1,
                                            'enableError' => true,
                                            'options' => [
                                                'class' => 'input-priority'
                                            ]
                                        ], [
                                            'name' => 'price_children',
                                            'type'  => NumberControl::class,
                                            'title' => Yii::t('app', 'Price children'),
                                            'defaultValue' => 1,
                                            'enableError' => true,
                                            'options' => [
                                                'class' => 'input-priority'
                                            ]
                                        ]
                                    ]
                                ])->label(Yii::t('app', 'Schedule') . ' (' . Yii::$app->formatter->asDate($dates[$index]) . ')'); ?>
                            </div>
                        </div>`

Вот основная часть, думаю остальной код будет лишним, хотя могу добавить и его, если необходимо

@Moonwolf45
Copy link
Author

Еще может быть вот так, если нажимать уже на скопированные строки:
2

@unclead
Copy link
Owner

unclead commented Aug 3, 2021

will be fixed in #348 (I close this ticket as duplicat)

@unclead unclead closed this as completed Aug 3, 2021
@unclead
Copy link
Owner

unclead commented Aug 6, 2021

@Moonwolf45 The issue should be fixed in version 2.25.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants