KeyTable not work after other tab returned.

KeyTable not work after other tab returned.

Alexey1987Alexey1987 Posts: 9Questions: 2Answers: 0
edited December 2015 in Free community support

I have Bootstrap tabs.

<ul class="nav nav-tabs" data-tabs="tabs" id="myTab">
    <li role="presentation" class="active">
           <a data-toggle="tab" href="#search" id="li-search">Поиск</a></li>
     <li role="presentation">
            <a data-toggle="tab" href="#journal" id="li-journal">Журнал</a></li>
</ul>

Both tabs have datatable. On Search tab I can search info and select ro, after I can see all selected rows in journal. I use KeyTable on search tab and it work in first time, but if I go to the Journal and return(twice: search->journal->search->jounal-search), KeyTable not work instead moving on rows keys up and down scrolling my table. Help me please!

P.S.
DataTables-1.10.9
Bootstrap-3.3.5
KeyTable-2.0.0

Answers

  • Alexey1987Alexey1987 Posts: 9Questions: 2Answers: 0
    edited December 2015

    Issue hapends when I have 2 keys in dataTable on one page. If I delete one of them, keys work, another I have trouble. How I can solve this issue?

  • Alexey1987Alexey1987 Posts: 9Questions: 2Answers: 0
    edited December 2015

    I try disable tableSearch on tab of Journal and enable tableSearch on tab of search, that is no help.
    This code

     $("#li-search").bind('shown.bs.tab', '#li-search', function () {
            tableJournal.keys.disable();
            tableSearch.keys.enable();
            tableSearch.cell(':eq(1)').focus();
        });
    
        $("#li-journal").bind('shown.bs.tab', '#li-journal', function () {
            if (tableJournal!= undefined) {
                tableJournal.keys.enable();
            }
            tableSearch.keys.disable();
        });
    
  • Alexey1987Alexey1987 Posts: 9Questions: 2Answers: 0
    edited December 2015

    How I can disable(or delete) KeyTable and later enable (or add) it?

This discussion has been closed.