KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Possible bug on Select2 #1129

Closed branden opened this topic on on Oct 16, 2019 - 2 comments

branden commented on Oct 16, 2019

Good day,

I have multiple select2 in my reports and it seems to all work fine. However i have an issue when the page loads, its displays the contents in the select2 and distorts the view for a few seconds, depending on the amount data the select2 has.

is there any work-around to this?

<?php

        Select2::create(array(
            "multiple" => true,
            "name" => "campaigns",
            "id" => "campaigns",
            "placeholder" => "    Filter by campaign(s)",
            "dataStore" => $this->dataStore("whatsappCampaigns"),
            "dataBind" => array(
                "text" => "name",
                "value" => "id",
            ),
            "attributes" => array(
                "class" => "form-control",
            ),

        )); ?>
KoolReport commented on Oct 17, 2019

Hi Branden,

I understand the behaviour, it is because the css resource of select2 is loaded dynamically so at the time select2 is rendering, the css is on the way. One of possible work around is that you register the css of select2 on your page in advanced. You can located the file koolreport/inputs/bower_components/select2/css/select2.min.css, you copy this file to somewhere and use the link tag to include to your page.

branden commented on Oct 17, 2019

i've copied the file and the added the link to the page, the transition looks a bit smoother, but it stills behaves that way. Anyways thanks for the response. i'm not sure we can do anything else here.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
bug
help needed

Inputs