DataTables logo DataTables

via Ad Packs
Why are fnSetFocus and fnCellFromCoords private?
  • koidekoide
    Posts: 3
    I have a DataTable with KeyTable (with jEditable plugged in) enabled where the first three columns should not receive focus when navigating the table.

    I finally did this by modifying KeyTable.js exposing those two methods and then
        keys.event.focus(0, null, function () {
            pos = keys.fnGetCurrentPosition();
            keys.fnSetFocus(keys.fnCellFromCoords(3, pos[1]), true);
        });
        keys.event.focus(1, null, function () {
            pos = keys.fnGetCurrentPosition();
            keys.fnSetFocus(keys.fnCellFromCoords(3, pos[1]), true);
        });
        keys.event.focus(2, null, function () {
            pos = keys.fnGetCurrentPosition();
            keys.fnSetFocus(keys.fnCellFromCoords(3, pos[1]), true);
        });
    

    Why aren't this methods public in the official release? They offer a lot more flexibility in KeyTable's usage.
  • allanallan
    Posts: 15,851
    fnSetPosition is the public alias of the internal function _fnSetFocus and it abstracts the "node or coordinates" issue out (you can pass in either).

    Allan
  • koidekoide
    Posts: 3
    In what version? I can't find that function in non minimized 1.1.1
  • allanallan
    Posts: 15,851
    KeyTable 1.1.1 is over two years old now :-). The current release is 1.1.7: http://datatables.net/download/ . I think it was around 1.1.4 where that function was added.

    Allan
  • koidekoide
    Posts: 3
    Found the culprit, googling for KeyTable has as first result http://www.sprymedia.co.uk/article/KeyTable which has a link to the direct 1.1.1 download and no direct link that I could see to the right download location. It would be nice of you to edit that page to point to the right download page.

    It certainly seemed strange to me that KeyTable didn't have maintenance releases :)

    Thanks!
  • allanallan
    Posts: 15,851
    Ah! Yup - I'll get that page updated. Thanks!

    Allan
This discussion has been closed.
← All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support

Get useful and friendly help straight from the source.

In this Discussion