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 1.4k 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

      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 Reply Quote 0
      • S Offline
        sdetweil @fischi87
        last edited by

        @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 Reply Quote 0
        • F Offline
          fischi87 @sdetweil
          last edited by

          @sdetweil

          For example i try this?

          return this.hide()
          

          U think it will be better?

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @fischi87
            last edited by

            @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 Reply Quote 0
            • F Offline
              fischi87 @sdetweil
              last edited by

              @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 Reply Quote 0
              • S Offline
                sdetweil @fischi87
                last edited by sdetweil

                @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 Reply Quote 0
                • F Offline
                  fischi87 @sdetweil
                  last edited by

                  @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 Reply Quote 0
                  • S Offline
                    sdetweil @fischi87
                    last edited by

                    @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 Reply Quote 0
                    • F Offline
                      fischi87 @sdetweil
                      last edited by

                      @sdetweil

                      It works thanks Sam

                      1 Reply Last reply Reply Quote 0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      • 1 / 1
                      • First post
                        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