• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-todoist dosent hide with this Option

Scheduled Pinned Locked Moved Solved Troubleshooting
9 Posts 2 Posters 791 Views 2 Watching
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 Offline
    fischi87
    last edited by Mar 7, 2024, 10:17 PM

    HI,

    i set the hideWhenEmpty to true but it still display the header and the borderline. I had a look at the code and there I saw nothing about defaults with hideWhenEmpty. I saw in the code there is a getDom function but this dosent work.

    someone know about that?

    thanks

    S 1 Reply Last reply Mar 8, 2024, 2:23 PM Reply Quote 0
    • S Away
      sdetweil @fischi87
      last edited by Mar 8, 2024, 2:23 PM

      @fischi87 I looked at code and it uses that property, incorrectly in my opinion

      Screenshot_20240308_071505_Chrome.jpg

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      F 1 Reply Last reply Mar 8, 2024, 2:36 PM Reply Quote 0
      • F Offline
        fischi87 @sdetweil
        last edited by Mar 8, 2024, 2:36 PM

        @sdetweil

        For example i try this?

        return this.hide()
        

        U think it will be better?

        S 1 Reply Last reply Mar 8, 2024, 2:48 PM Reply Quote 0
        • S Away
          sdetweil @fischi87
          last edited by Mar 8, 2024, 2:48 PM

          @fischi87 no… getDom() should ALWAYS return something

          	getDom: function () {
          	
          		//Add a new div to be able to display the update time alone after all the task
          		var wrapper = document.createElement("div");
          
          		//display "loading..." if not loaded
          		if (!this.loaded) {
          			wrapper.innerHTML = "Loading...";
          			wrapper.className = "dimmed light small";
          			return wrapper;
          		}
                          // moved to here and changed return
          		if (this.config.hideWhenEmpty && this.tasks.items.length === 0) {
          			return wrapper;
          		}
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          F 1 Reply Last reply Mar 8, 2024, 8:39 PM Reply Quote 0
          • F Offline
            fischi87 @sdetweil
            last edited by Mar 8, 2024, 8:39 PM

            @sdetweil

            I think this don’t work because I see still the header. it es possible to display a empty wrapper?

            S 1 Reply Last reply Mar 8, 2024, 8:56 PM Reply Quote 0
            • S Away
              sdetweil @fischi87
              last edited by sdetweil Mar 8, 2024, 8:59 PM Mar 8, 2024, 8:56 PM

              @fischi87 header is different its not hidden.

              do, could do self.hide()
              I was returning an empty div

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              F 1 Reply Last reply Mar 8, 2024, 9:50 PM Reply Quote 0
              • F Offline
                fischi87 @sdetweil
                last edited by Mar 8, 2024, 9:50 PM

                @sdetweil

                u can explain me how it works with self.hide()? where I have to write it down and so on?

                S 1 Reply Last reply Mar 8, 2024, 10:29 PM Reply Quote 0
                • S Away
                  sdetweil @fischi87
                  last edited by Mar 8, 2024, 10:29 PM

                  @fischi87 add the one line, this.hide() shown below

                                      // moved to here and changed return
                      		if (this.config.hideWhenEmpty && this.tasks.items.length === 0) {
                                          this.hide()  // added hide to hide header too
                      			return wrapper;
                      		}
                  

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  F 1 Reply Last reply Mar 9, 2024, 9:33 PM Reply Quote 0
                  • F Offline
                    fischi87 @sdetweil
                    last edited by Mar 9, 2024, 9:33 PM

                    @sdetweil

                    It works thanks Sam

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    1 / 1
                    • First post
                      7/9
                      Last post
                    Enjoying MagicMirror? Please consider a donation!
                    MagicMirror created by Michael Teeuw.
                    Forum managed by Sam, technical setup by Karsten.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy