[BUG monday SDK] monday.execute for 'openItemCard' does not resolve promise for kind 'updates' when closing item card

Hi there,

I created a new issue for the monday-sdk-js package: [Bug] monday.execute for 'openItemCard' does not resolve promise for kind 'updates' · Issue #92 · mondaycom/monday-sdk-js · GitHub
I wanted to report it here as well in case I am missing someone or to check if someone else also experienced this issue.
This is a blocking bug for us in creating a custom view in monday.com.

Thank you for checking this and helping us out!

Hello there @frednijs,

Thank you for that!

I will share this with the person in charge of it so that it can be checked :grin:

Cheeers,
Matias

1 Like

Hello again @frednijs,

A fix for this will be deployed soon. You can check it next Monday and it should be deployed already.

Cheers,
Matias

1 Like

Great, thank you!

1 Like

Happy to help @frednijs !

Was this resolved?
I am facing the same issue.
monday.execute(“openItemCard”, {
itemId: item.id,
kind:“updates”
});

We tested this and this issue was resolved. However, we are also facing the issue again.

Since opening the item card is resizing the window where the app is running, we used this code as a workaround. It is not completely failsafe and it is of course a workaround but it is doing the trick for us. Maybe it can help you as well.

/**
 * Workaround for issue: https://github.com/mondaycom/monday-sdk-js/issues/92
 */
const resizePromise = new Promise<void>((resolve) => {
  const initialWidth = window.innerWidth;
  const resizeHandler = () => {
    if (window.innerWidth >= initialWidth) {
      resolve();
      window.removeEventListener('resize', resizeHandler);
    }
  };
  setTimeout(() => {
    window.addEventListener('resize', resizeHandler);
  }, 500);
});

const mondayPromise = monday.execute('openItemCard', { itemId: item.id, kind: 'updates' });
await Promise.any([resizePromise, mondayPromise]);

can you share the output? If I do not give kind attribute it is opening up an item view card and when I give kind: “updates” as an attribute, it shows nothing.

Hello there,

If you are still facing issues with this, please send over an email to appsupport@monday.com with all the data about your situation and we will take a closer look from there!

Cheers,
Matias