Skip to content

Fixed modal action docs #146

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

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/src/docs/components/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Now we can update the template of the type class to use the newly added variable
{{ label }}
</button>

<div class="modal fade" id="#action-modal-{{ name }}">
<div class="modal fade" id="action-modal-{{ name }}">
<div class="modal-dialog">
<div class="modal-content">
{{ include(template_path, template_vars) }} // [!code ++]
Expand All @@ -285,6 +285,8 @@ class ModalActionType extends ButtonActionType
{
public function buildView(ActionView $view, ActionInterface $action, array $options): void
{
$templatePath = $options['template_path'];

if ($view->parent instanceof ColumnValueView) { // [!code ++]
$value = $view->parent->vars['value']; // [!code ++]

Expand Down Expand Up @@ -568,4 +570,4 @@ If `FormActionType` is used, the scripts will append hidden inputs with selected
```html
<input type="hidden" name="product_id[]" value="1">
<input type="hidden" name="category_id[]" value="4">
```
```
Loading