title: Bootstrap 5 collapse show/hide not working when invoked with JS
body: <p>I am attempting to use javascript to show or hide a collapsable element but not both.
  (that is to say i dont want toggle to be enabled)</p>
  <p>according to the documentation
  <a href="https://getbootstrap.com/docs/5.0/components/collapse/#via-javascript" rel="nofollow noreferrer">https://getbootstrap.com/docs/5.0/components/collapse/#via-javascript</a></p>
  <p>i can do something like this to trigger toggling between shown and hidden</p>
  <pre><code>    var myCollapse = document.getElementById('myCollapse')
  var bsCollapse = new bootstrap.Collapse(myCollapse, {
    toggle: true
  })
  </code></pre>
  <p>of course if i change toggle to false it stops it from doing anything - as expected.
  however it also says i can use the show and hide properties on an object passed as the second array to enable/disable these behaviors</p>
  <p>like so</p>
  <pre><code>    var myCollapse = document.getElementById('myCollapse')
  var bsCollapse = new bootstrap.Collapse(myCollapse, {
    toggle: false,
    show: true,
    hide: false
  })
  </code></pre>
  <p>but if i try to use these options only toggle works</p>
  <p>I looked at the BS js and found that it does check the status of toggle</p>
  <pre><code>if (_this._config.toggle) {
      _this.toggle();
    }
  </code></pre>
  <p>however there is no equivalent for show and hide which suggests to me that the show and hide options of the bootstrap.Collapse() object do nothing.</p>
  <p>Am I correct in my belief that the show and hide options dont work when using bootstrap.Collapse()?</p>
  <p>If no what am i doing wrong.</p>