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

JS render must be reordered #1918

Open
mvorisek opened this issue Oct 26, 2022 · 0 comments
Open

JS render must be reordered #1918

mvorisek opened this issue Oct 26, 2022 · 0 comments
Labels

Comments

@mvorisek
Copy link
Member

mvorisek commented Oct 26, 2022

repro code:

$modal = Modal::addTo($app);

$modal->set(function (View $p) {
    Message::addTo($p, ['test']);
});

$modal->js(true)->modal('show');

$button = Button::addTo($app)->set('Test');
$button->on('click', $modal->jsShow());

I would expect modal with message displayed, but empty modal is shown instead.

image

the problem is:

image

the show JS code must be rendered after modal is configured

notice, when modal is closed and reopened by the button, message is rendered:

image

notice also the first problem corrupts the top left/right modal rounded corners

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

No branches or pull requests

1 participant