collapse(value) {
    const promise = this.redraw();
    if (!value) {
      this.checkValidity(this.data, !this.pristine);
    }
    return promise;
  }
Set collapsed state.
@param {boolean} value - The collapsed state.
@returns {void}