D
D
Denis Bukreev2016-08-16 09:59:24
JavaScript
Denis Bukreev, 2016-08-16 09:59:24

Render conflict between VueJS and Semantic UI - how to resolve?

So it goes.
The project is under NDA, so I can't show anything.
The problem is this: there is a modal window in which rows are displayed in the table. These lines contain different input, textarea, checkbox, select, etc., each of which is styled using Semantic UI.
When I launch a modal window, VueJS fills this table with v-for, and some elements with v-if
As I understand it, first the semantic creates the modal window and elements, and then VueJS renders the lists.
As a result, the modal window is incorrectly calculated in its height (influence of list rendering). This is fixed when the window is resized, i.e. When resizing, Semantic again calculates the parameters of the modal window and calculates everything correctly with the ready list.
The same problem with rendering elements: first Semantic distributes styles to them, but since v-if does not initially show these elements, Semantic does not see them either. And then VueJS renders and, as a result, everything is rendered in the browser's native styles (what is rendered using JS).
How to be in this situation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Evgrafovich, 2016-08-16
@Tantacula

Maybe try v-show instead of v-if?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question