GridStack Angular Library - v12.3.3
    Preparing search index...

    Class BaseWidgetAbstract

    Base widget class for GridStack Angular integration.

    Index

    Constructors

    Methods

    Properties

    Constructors

    Methods

    • Override this method to return serializable data for this widget.

      Return an object with properties that map to your component's @Input() fields. The selector is handled automatically, so only include component-specific data.

      Returns undefined | NgCompInputs

      Object containing serializable component data

      serialize() {
      return {
      title: this.title,
      value: this.value,
      settings: this.settings
      };
      }
    • Override this method to handle widget restoration from saved data.

      Use this for complex initialization that goes beyond simple @Input() mapping. The default implementation automatically assigns input data to component properties.

      Parameters

      Returns void

      deserialize(w: NgGridStackWidget) {
      super.deserialize(w); // Call parent for basic setup

      // Custom initialization logic
      if (w.input?.complexData) {
      this.processComplexData(w.input.complexData);
      }
      }

    Properties

    widgetItem?: NgGridStackWidget

    Complete widget definition including position, size, and Angular-specific data. Populated automatically when the widget is loaded or saved.