Missing select.toggleable() documentation

Missing select.toggleable() documentation

Loren MaxwellLoren Maxwell Posts: 382Questions: 93Answers: 10

Description of problem:
Recently needed this function in the API and discovered (much to my delight!) that it exists, but there's no mention of it here:
https://datatables.net/reference/api/

And a 404 error here:
https://datatables.net/reference/api/select.toggleable()

Replies

  • kthorngrenkthorngren Posts: 20,091Questions: 26Answers: 4,721

    Its an option select.toggleable not an API :smile:

    Kevin

  • Loren MaxwellLoren Maxwell Posts: 382Questions: 93Answers: 10
    edited June 2020

    Arghhh! You're right!

    Sigh . . . I apparently need some remedial training on options vs API :/

  • kthorngrenkthorngren Posts: 20,091Questions: 26Answers: 4,721
    edited June 2020

    Wait... I just saw your other thread with select.toggleable(true). Where did you find reference to that? Sounds like you are right. @allan or @colin may need to add that to the API section.

    Kevin

  • Loren MaxwellLoren Maxwell Posts: 382Questions: 93Answers: 10

    Yeah, that's what I was referring to, I didn't see any documentation for that.

  • kthorngrenkthorngren Posts: 20,091Questions: 26Answers: 4,721

    Just tried and got lucky :smile:

    Kevin

  • Loren MaxwellLoren Maxwell Posts: 382Questions: 93Answers: 10
    edited June 2020

    Exactly!

    I saw the API method for select.style() and thought "Well, maybe . . ."

    When I saw your post about it being an option, I thought maybe that's why it worked and therefore I could set any option in that way, but now it seems my initial understanding about how options and the API works was correct -- an option isn't accessible after initialization unless there's an API method that makes it so, correct?

  • rf1234rf1234 Posts: 2,794Questions: 85Answers: 405

    an option isn't accessible after initialization unless there's an API method that makes it so, correct?

    Right, here are two quotations from the docs. Took me a while to understand this ...

    DataTables' huge range of options can be used to customise the way that it will present its interface, and the features available, to the end user. This is done through its configuration options, which are set at initialisation time.

    DataTables and its extensions have an extensive API which can be used to access the data contained in the table and otherwise manipulate the table after initialisation has completed.

  • Loren MaxwellLoren Maxwell Posts: 382Questions: 93Answers: 10

    Thanks, @rf1234. I've been programming for several years but it's all self-taught, so occasionally I run across something like this where I'm not positive I'm using the correct terminology when I get into a discussion with more experienced programmers!

  • rf1234rf1234 Posts: 2,794Questions: 85Answers: 405

    Same here. No idea what the "correct terminology" is. Just muddling through. It's all in the docs - somewhere ...

  • allanallan Posts: 61,323Questions: 1Answers: 10,023 Site admin

    It's all in the docs - somewhere ...

    Apart from select.toggleable() apparently! I've just added it here.

    Thanks for letting me know about this @Loren Maxwell.

    Allan

This discussion has been closed.