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

    Tree table example

    Show & Tell
    3
    4
    2890
    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.
    • F
      Fernando2684 last edited by Fernando2684

      This is an example of how to create a “tree table” based on qtree and qtable components, could be useful.

      https://jsfiddle.net/fernando2684/p0k8szvj/43/

      Example:

      0_1529289149833_165fe613-7856-4d47-b654-24f1e8254e6d-image.png

      1 Reply Last reply Reply Quote 2
      • Hawkeye64
        Hawkeye64 last edited by

        Good job!

        1 Reply Last reply Reply Quote 0
        • nothingismagick
          nothingismagick last edited by nothingismagick

          That is really sweet @Fernando2684 - nice idea. As far as your code goes, there are several places where you could clean it up, first and foremost you should always aviod type conversion. You should get in the habit of using === and !== instead of == and !=. This is what Douglas Crockford has to say about it (from this SO post )

          '' == '0'           // false
          0 == ''             // true
          0 == '0'            // true
          
          false == 'false'    // false
          false == '0'        // true
          
          false == undefined  // false
          false == null       // false
          null == undefined   // true
          
          ' \t\r\n ' == 0     // true
          

          Here is a little update to show you that it also works as expected: https://jsfiddle.net/7fuckt8s/ (It seems I win the jsfiddle lottery!!!)

          1 Reply Last reply Reply Quote 2
          • F
            Fernando2684 last edited by

            @nothingismagick good,that is the idea and everyone’s ideas are welcome.

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