No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Add custom class in q-markup-table ?

    Framework
    3
    9
    882
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jitendra16 last edited by

      Screen-Shot-2020-09-05-at-11-41-31.png

      how to add ‘customClass’ in table element?

      dobbel 1 Reply Last reply Reply Quote 0
      • K
        keload last edited by keload

        You have a table-class in Q-Table API 😉 https://quasar.dev/vue-components/table#QTable-API

        dobbel 1 Reply Last reply Reply Quote 0
        • dobbel
          dobbel @keload last edited by

          @keload Q-table != Q-markup-table

          1 Reply Last reply Reply Quote 0
          • K
            keload last edited by

            ok sorry, actually no props are propagated on the element “table”.

            So what I’ll do, I’ll apply the style from the parent .parent-class > table.

            1 Reply Last reply Reply Quote 0
            • dobbel
              dobbel @jitendra16 last edited by dobbel

              @jitendra16 you could use css style to target the parent customclass with child q-table like:

              .customClass > table {
                  color: red
                }
              
              J 1 Reply Last reply Reply Quote 1
              • J
                jitendra16 @dobbel last edited by

                @dobbel Actually i need to access ‘table’ element by document.getElementsByClassName() in a custom component used for exporting table into CSV.

                dobbel 1 Reply Last reply Reply Quote 0
                • dobbel
                  dobbel @jitendra16 last edited by

                  @jitendra16

                  why not create an csv export of the data you use to create the table instead of the table itself?

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    jitendra16 @dobbel last edited by

                    @dobbel not only CSV but pdf and print also done by component.

                    dobbel 1 Reply Last reply Reply Quote 0
                    • dobbel
                      dobbel @jitendra16 last edited by dobbel

                      @jitendra16

                      how about this:

                      document.getElementsByClassName("customClass").firstElementChild
                      

                      or firstChild

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post