Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e63f66a

Browse files
committed
minor EasyCorp#4162 Enable the use of VueJS (mneuhaus)
This PR was merged into the 3.0.x-dev branch. Discussion ---------- Enable the use of VueJS I've been trying to enhance our EasyAdmin with some VueJS. I want to wrap most of the EasyAdmin HTML into a VueJS App, but one Problem i found was, that the _filters_modal_html.twig is included quite "deep" into the HTML, which produces warnings when i try to set up a vue app starting from the .content-wrapper for example. The main issue is, that that template file contains a script tag with javascript code. By moving it to the body_javascript section everything works nicely together. Commits ------- ce605eb Enable the use of VueJS
2 parents 862eda7 + ce605eb commit e63f66a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Resources/views/crud/index.html.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,15 @@
214214
{% block delete_form %}
215215
{{ include('@EasyAdmin/crud/includes/_delete_form.html.twig', with_context = false) }}
216216
{% endblock delete_form %}
217-
218-
{% if filters|length > 0 %}
219-
{{ include('@EasyAdmin/crud/includes/_filters_modal.html.twig') }}
220-
{% endif %}
221217
{% endblock main %}
222218

223219
{% block body_javascript %}
224220
{{ parent() }}
225221

222+
{% if filters|length > 0 %}
223+
{{ include('@EasyAdmin/crud/includes/_filters_modal.html.twig') }}
224+
{% endif %}
225+
226226
<script type="text/javascript">
227227
$(function() {
228228
const customSwitches = document.querySelectorAll('td.field-boolean .custom-control.custom-switch input[type="checkbox"]');

0 commit comments

Comments
 (0)