Scritik / prestui

UI library for PrestaShop modules
MIT License
44 stars 14 forks source link

switch or select error elements inside tabs #13

Closed oldlastman closed 7 years ago

oldlastman commented 7 years ago

i'm trying this code

`

    <ps-select label="Select input" name="ps_select" chosen='true'>
    <option value="test">test</option>
    <option value="test2">test2</option>
</ps-select>
    </ps-tab>`

and don't render well

there is some thing wrong in my code?

thanks

oldlastman commented 7 years ago

maybe its related with panel attribute? i just put <ps-tab label="test" id="tab_base" icon="icon-AdminParentModules" img="../img/t/AdminBackup.gif" fa="cogs" panel="false"> and swtich works but select not work

Scritik commented 7 years ago

Hi @oldlastman,

The panel attribute is just here to wrap the content into a panel. Are you sure that you content is in a form (like specified in the doc)?

oldlastman commented 7 years ago

hi! thanks for your answer yes i'm using form tag

this is an full example sorry code not show all tags http://pastebin.com/8UTfVNgN

< ps-panel >
    < form class="form-horizontal" name="module_form" method="post" action="">
< ps-tabs position="left">
    < ps-tab label="Tab 1" active="true" id="tab1" icon="icon-AdminParentModules" img="../img/t/AdminBackup.gif" fa="cogs">
            < ps-switch name="switch" label="Switch" yes="Yes" no="No" active="true">< /ps-switch>
            < ps-select label="Select input" name="ps_select" chosen="true">
                    < option value="testito">testito< /option>
                    < option value="test2">test2< /option>
            < /ps-select>
    < /ps-tab>
    < ps-tab label="Tab 2" id="tab2" icon="icon-AdminParentModules" img="../img/t/AdminBackup.gif">
            < ps-switch name="switch2" label="Switch2" yes="Yes" no="No" active="false">< /ps-switch>
            < ps-select label="Select input2" name="ps_select2" chosen="true">
                    < option value="testito3">testito3< /option>
                    < option value="test4">test4< /option>
            < /ps-select>
    < /ps-tab>
    < ps-tab label="Tab 3" id="tab3">
        // content 3
    < /ps-tab>
< /ps-tabs>
< ps-panel-footer>
        < ps-panel-footer-submit title="Guardar cambios" icon="process-icon-save" direction="right" name="submitAtt_UserGroupAssignModule">< /ps-panel-footer-submit>
< /ps-panel-footer>
< /form>
< /ps-panel>

if i put:

thanks

Scritik commented 7 years ago

Sorry for the delay. Do you still have the issue? I will try to keep a look at this asap.

Also, I just made a PR with Riot 3 support, if you want to give it a try. It took me longer than expected but it's finally here.

Scritik commented 7 years ago

I found the issues @oldlastman!

It was not your code and fixed both on the riot3 PR if you want to take a look at it.

Scritik commented 7 years ago

I merged the PR, and will release a new version asap. Please use this new version, with Riot3.