Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Apr 28, 2018
1 parent 49115aa commit 307c219
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/widgets/GridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,11 @@ protected function _createDataProvider()
$modelClassName = $this->modelClassName;

if ($modelClassName) {

return new ActiveDataProvider([
'query' => $modelClassName::find(),
]);

} else {
return new ArrayDataProvider([
'allModels' => [],
Expand Down
8 changes: 5 additions & 3 deletions src/widgets/views/dual-select.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@
<div class="col-sm-4 col-sm-offset-1">
<?= $widget->renderHtml($widget->hiddenLabel); ?>
<ul class="sx-sortable-hidden sx-sortable-list cursor-move <?= $widget->id; ?>-conncected">
<? foreach ($hidden as $value => $label) : ?>
<?= $widget->renderItem($value, $label); ?>
<? endforeach; ?>
<? if ($hidden): ?>
<? foreach ($hidden as $value => $label) : ?>
<?= $widget->renderItem($value, $label); ?>
<? endforeach; ?>
<? endif; ?>
</ul>
</div>
<div class="col-sm-2 text-center">
Expand Down

0 comments on commit 307c219

Please sign in to comment.