Skip to content

Feature/ Add Lookup to Multiline#1577

Merged
ibelar merged 50 commits intodevelopfrom
feature/multine-lookup
Dec 28, 2020
Merged

Feature/ Add Lookup to Multiline#1577
ibelar merged 50 commits intodevelopfrom
feature/multine-lookup

Conversation

@ibelar
Copy link
Copy Markdown
Contributor

@ibelar ibelar commented Dec 19, 2020

Screen Shot 2020-12-19 at 1 45 11 PM

BC Break

  1. $options property has been removed and passing Vue Props to components is now done using the new $componentProps property. Passing Props to each Vue component also required to properly identify the component.

Ex: passing Dropdown Props to all Dropdown component used in Multiline:

$componentProps = [Multiline::SELECT => ['floating' => true]]
  1. Passing component Props via $field->ui property also required specifying the component name. Array key 0 is no longer support.

Ex of setting Input component Props via $field->ui:

$this->addField('password', [
    'required' => true,
    'ui' => ['multiline' => [Multiline::INPUT => ['icon' => 'key', 'type' => 'password']]],
]);
  1. Since $options have been removed, passing Table Props is now done via the $tableProps property.
$multiline = $form->addControl('ml', [Multiline::class, 'tableProps' => ['color' => 'blue']]);
  1. Controlling each cell component Props, like width, using $field->ui also required to name that component.
$this->addExpression('total', [
    'expr' => function (Model $row) {
        return $row->get('qty') * $row->get('box');
    },
    'type' => 'integer',
    'ui' => ['multiline' => [Multiline::TABLE_CELL => ['width' => 1, 'class' => 'blue']]],
]);

@ibelar ibelar marked this pull request as draft December 19, 2020 18:47
@ibelar ibelar marked this pull request as ready for review December 23, 2020 15:07
@DarkSide666 DarkSide666 self-requested a review December 28, 2020 13:24
Copy link
Copy Markdown
Member

@DarkSide666 DarkSide666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ibelar ibelar merged commit 80f0997 into develop Dec 28, 2020
@ibelar ibelar deleted the feature/multine-lookup branch December 28, 2020 23:46
* Executes user-specified action when call-back is triggered.
*
* @param \Closure $fx
* @param callable $fx
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should keep \Closure to be stricter and prevent contextual issues with generic callable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

WIP - Add lookup to Multiline

3 participants