title: why v-bind:style is not reacting to changes if the data is set to a false value (null, false, undefined etc.)
body: <p>I am working with an accordion component and need to change the 'max-height' property of accordion body based on the value set to a vue data named 'cardBodyHeight'. This is the template part of the component: </p>
  
  <pre><code>&lt;template&gt;
      &lt;div class="input-card"&gt;
          &lt;div class="input-card__header"&gt;
              &lt;div class="input-card__title"&gt;
                  &lt;slot name="title"&gt;Card Title&lt;/slot&gt;
                  &lt;button class="input-card__cta" :class="{collapsed:cardCollapsed}" @click="toggleCardCollapse"&gt;
                      &lt;i class="fas fa-caret-down"&gt;&lt;/i&gt;
                  &lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="input-card__body" ref="inputCardBody" :style="{maxHeight: cardBodyHeight ? cardBodyHeight+'px' : 'auto'}" :class="{collapsed:cardCollapsed}"&gt;
              &lt;div class="input-card__body__content"&gt;
                  &lt;slot name="body"&gt;Card Body&lt;/slot&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>and this is the script part:</p>
  
  <pre><code>&lt;script&gt;
  export default {
    name: "InputCard",
    data() {
      return {
        cardCollapsed: true,
        cardBodyHeight: null
      };
    },
    methods: {
      toggleCardCollapse() {
        this.cardCollapsed = !this.cardCollapsed;
        // recalculate card body max height
        this.cardBodyHeight = this.$refs.inputCardBody.scrollHeight;
        // set the max-height to auto after 0.5s
        setTimeout(()=&gt;{
          this.cardBodyHeight = null;
        },500);
      }
    }
  };
  &lt;/script&gt;
  </code></pre>
  
  <p>I expected to vue that the inline 'max-height' property will be set to 'auto' when 'cardBodyHeight' is set to null (see the setTimeout portion in 'toggleCardCollapse' method) but it seems vue doesn't care at all if the value is falsy. the style binding works just fine if the value is number. What am I missing here?</p>
  
  <p>Thanks in advance!</p>