You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an option to pass input fields in an NgGridStackWidget:
export interface NgGridStackWidget extends GridStackWidget {
/** Angular tag selector for this component to create at runtime */
selector?: string;
/** serialized data for the component input fields */
input?: NgCompInputs;
/** nested grid options */
subGridOpts?: NgGridStackOptions;
}
This data however can only be access by using the @Input decorator. A signal-based approach does not work.
According to the documentation binding should be same:
Binding to an input is the same in both signal-based and decorator-based inputs:
<custom-slider [value]="50" />
But using something like value = input<number>(); if value was passed via input of NgGridStackWidget will result in value being a number rather than a signal. So, trying to access the value as a signal (e.g. The slider's value is ${this.value()}) will result in an error.
Regards
The text was updated successfully, but these errors were encountered:
GridStack ng wrapper was written long before Angular had signal inputs (based on code I wrote 8 years ago when I first started using the legacy jquery UI based js gridstack) and breaks due to this simple code.
All my code still uses @Input() (they work and easy to understand with set/get/transform) so I'm not super familiar with signal input, but a quick read has Signals created by the input function are read-only. so you can't call update() on them instead ? not sure how this would work...
Hello,
There is an option to pass input fields in an
NgGridStackWidget
:This data however can only be access by using the
@Input
decorator. A signal-based approach does not work.According to the documentation binding should be same:
But using something like
value = input<number>();
ifvalue
was passed viainput
ofNgGridStackWidget
will result invalue
being a number rather than a signal. So, trying to access the value as a signal (e.g.The slider's value is ${this.value()}
) will result in an error.Regards
The text was updated successfully, but these errors were encountered: