'content' option not available in ui.popup

This issue has been tracked since 2021-12-03.

I'm trying to use the ui.popup from rapid functions.

But, when i'm trying to add contents to the popup, it gives me error that says content is not an available option.
The Docs clearly says that you need 'content' to add the content
https://resources.jointjs.com/docs/rappid/v3.4/ui.html#ui.Popup

Here's the error that i got:
Argument of type '{ target: any; content: any; }' is not assignable to parameter of type 'Options'.
Object literal may only specify known properties, and 'content' does not exist in type 'Options'

What am i doing wrong? does the option for content changed?
thanks!

kumilingus wrote this answer on 2021-12-03

Hi, you'll have to add // @ts-ignore comment for the time being for these options or try to apply a fix like below locally (rappid.d.ts).

        namespace Popup {

            export interface Options extends mvc.ViewOptions<undefined> {
                content: string;
                target: string | JQuery | Element;
                padding?: number;
                autoClose?: boolean;
            }
        }

        class Popup extends ContextToolbar {

            constructor(options?: Popup.Options);

            renderContent(): void;
        }

I am not 100% sure, I think something has changed with Backbone types which make the default options types less forgiving.

Hndry wrote this answer on 2021-12-03

Thank you very much! literally scratching my head for hours tryin to figure it out.

More Details About Repo
Owner Name clientIO
Repo Name joint
Full Name clientIO/joint
Language JavaScript
Created Date 2009-09-11
Updated Date 2022-12-06
Star Count 3717
Watcher Count 155
Fork Count 817
Issue Count 53

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date