framework7 icon indicating copy to clipboard operation
framework7 copied to clipboard

Lost material style on dynamically added components

Open matejicekme opened this issue 9 years ago • 4 comments

Hi there,

Got an issue with F7 + vue. When I create item dynamically I lost the material theme (when using material). For example I build a form depending user previous input and when building it, the used theme = IOS theme. Got “material: true” on my F7 app initialization and commented the IOS css files.Anyone ?

Thank you

matejicekme avatar Aug 14 '17 10:08 matejicekme

Well, can't really understand how it is possible. Are you trying to change theme dynamically?

nolimits4web avatar Aug 20 '17 21:08 nolimits4web

This seems to work well for me, even for components I add dynamically:

var myApp = new Framework7();
if (myApp.device.android) {
    $$("#css_main").attr('href', 'f7/css/framework7.material.min.css');
    $$("#css_colors").attr('href', 'f7/css/framework7.material.colors.min.css');
}

In the <head> of index.html I have the following:

<link id="css_main" rel="stylesheet" href="f7/css/framework7.ios.min.css">
<link id="css_colors" rel="stylesheet" href="f7/css/framework7.ios.colors.min.css">

eslindsey avatar Aug 21 '17 13:08 eslindsey

chit

chittattoo avatar Aug 21 '17 15:08 chittattoo

Issue is closed because of outdated/irrelevant/not actual

If this issue is still actual and reproducible for latest version of Framework7, please create new issue and fill the issue template correctly:

  • Clearly describe the issue including steps to reproduce when it is a bug.
  • Make sure you fill in the earliest version that you know has the issue.
  • Provide live link or JSFiddle/Codepen or website with issue

nolimits4web avatar Mar 07 '18 14:03 nolimits4web