This topic contains 1 reply, has 2 voices, and was last updated by Sean Sean 1 year, 1 month ago.

Select2-Full needed


  • Sturm
    Participant

    Posts: 27
    Member Reply #14735

    There are so many solutions to this problem, but none of them are available…yet.

    I need to use Select2-Full rather than the basic Select2 that is included in Metronic 5 because I need the ability to use its containerCssClass option. Thus, unless/until there are plans to include Select2-Full in a future version of Metronic 5, I need to download it separately and include it in my project.

    That would be fine, except I cannot import it after vendors.bundle.js because that file’s Select2 comes first, thus overriding the Select2-Full that is imported afterward. I also cannot place it before the vendors.bundle.js import, since it requires jQuery, and I’ve had other problems in the past with importing jQuery separately. The solution seems to be that I need to somehow pull Select2 out of vendors.bundle.js; at least, just the JavaScript import. (The CSS styles can stay).

    No problem, I figure, that’s what the Metronic 5 documentation talks about in its Tasks section–customizing the Metronic 5 installation. So I modify the default.json file in the /theme/default/tools/conf folder (this is version 5.0.5). When I run gulp, however, I am assaulted by many errors regarding ‘sass’. After having read other posts in this forum describing this exact problem, it seems to be related to the existence of the /bower_components folder (or rather, the lack thereof).

    Now, before you try to tell me to upgrade to version 5.0.6 or later of Metronic to fix this problem, hear me out. Right now, the only version available on ThemeForest is 5.1. I figure that must be even better, right? Well, I gave that version a try, and sure enough, it allows me to remove Select2; I can take its JavaScript reference out of default.json and run gulp again to get a vendors.bundle.js that doesn’t include Select2. I can then import my downloaded copy of Select2-Full and mission accomplished! Or… not quite.

    I don’t know what other changes you’ve made to v5.1, since they aren’t even listed in the changelog yet. However, one thing I have noticed is that the styling has changed somewhat. Several things are not rendering correctly anymore, such as the icon used for the DatePicker and the Loading spinner that appears on during page loads.

    Thus, this leaves me in a pickle:

    • I cannot use 5.0.5, since I cannot remove Select2 from vendors.bundle.js. (Because it uses bower, which has since been replaced with yarn.)
    • I cannot use 5.1, since it has unusual changes to the CSS that messes with the styling of my pages. (Could just be a bug.)
    • I cannot use 5.0.6 nor 5.0.7, since there is no place where I can download it now (even though one of them probably would fix my problem). (Also, this seems like a very unfortunate oversight–not allowing your users to download older versions of the theme.)

    Please give me some fourth option!

    • This topic was modified 1 year, 1 month ago by  Sturm. Reason: doesn't work very well; trying a instead
    • This topic was modified 1 year, 1 month ago by  Sturm. Reason: s don't work; going back to
    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #14787

    Hi,

    Sorry to hear about your issues. Unfortuanlly this is how HTML themes handled since we can not provide smooth updates since everyone uses the theme differently. But  we would suggest you to try to use our Github repo for easy merging whenever new updates come out so you can see what files are changes and what new files are added:
    https://keenthemes.com/metronic/git

    Regarding v5.1 update, we strongly recommend you using it since it comes with Bootstrap 4 stable support.
    Bootstrap 4 stable itself came with some breaking changes. Especially the input group markup was changed. Other than this the update should be quite smooth. Please try v5.1 from scratch and let us know if you have any issue and we will try to help to get updated to v5.1 fully.

    Thanks.

     

     

You must be logged in to reply to this topic.