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

Feature/ Add Lookup to Multiline #1577

Merged
merged 50 commits into from
Dec 28, 2020
Merged

Feature/ Add Lookup to Multiline #1577

merged 50 commits into from
Dec 28, 2020

Conversation

ibelar
Copy link
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
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
@@ -53,7 +53,7 @@ public function getUrlTrigger(): string
/**
* Executes user-specified action when call-back is triggered.
*
* @param \Closure $fx
* @param callable $fx
Copy link
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WIP - Add lookup to Multiline
3 participants