Is there any way of getting an specific setting programmatically?

Is there any way of getting an specific setting programmatically?

jmeilejmeile Posts: 23Questions: 3Answers: 0


I would like to get a responsive setting programmatically, for example, the current breakpoints. I debug a Datatable code and found that I can see all the responsive settings as follows:


There I see something like:

c: {…}
    auto: true
    breakpoints: (5) [...]
      0: {...}
          name: "desktop"
          width: infinity
          <prototype>: {...}
      1: {...}
          name: "tablet-l"
          width: 1024
          <prototype>: {...}
      ... More Breakpoints are listed
    ...More settings are listed
s: {...}
<prototype>: {...}

I would like to get the breakpoints, so, I tried:


But it always says: undefined

How can I get the breakpoints?

Best regards


  • colincolin Posts: 13,248Questions: 0Answers: 2,262

    That breakpoints object is within the c object, so you would reference that like:



  • allanallan Posts: 55,076Questions: 1Answers: 8,645 Site admin

    I should note that we consider those properties to be internal. If they aren't documented in the reference then they are liable to change between even minor versions. Realistically they probably won't, but if they do, that most likely wouldn't be even mentioned in the release notes since, as I say, they are considered to be internal.

    Just a warning if you do use them :).


  • jmeilejmeile Posts: 23Questions: 3Answers: 0

    @allan thanks for your advice. Actually, I found a better way of doing what I was looking for. I was needing this for this post:

    One of my ideas were to figure out which view was displayed on the user's browser by getting these breakpoints and compare them with the browser dimensions, but then I realized that I could use the function: responsive.hasHidden(), which gives me what I want.

    Best regards

Sign In or Register to comment.