Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom UI for Merge Tags remove autocomplete when typing #407

Open
willianjusten opened this issue Jun 20, 2024 · 1 comment
Open

Custom UI for Merge Tags remove autocomplete when typing #407

willianjusten opened this issue Jun 20, 2024 · 1 comment

Comments

@willianjusten
Copy link

Hey o/

So, I needed a more robust version for Merge Tags, since just the Select Box was too simple for my case (since I need to provide search), using the unlayer.registerCallback('mergeTag', fn()) worked fine, but I noticed that now the autocomplete box doesn't show up if I type { in the body as before.

Follow bellow how it was before.

image

I'd say that both features are different, we shouldn't remove this box option if we have a Custom UI when picking.

@willianjusten
Copy link
Author

@brunolemos , anything about this?

Explaining a bit more:

  • I created the registerCallback to open a Modal and also I'm passing the done function down, so when I select a property on my modal, it inserts correctly.
unlayer.registerCallback('mergeTag', (_, done) => {
      toggleUserPropertiesModal();
      setMergeTagSelect(() => done);
    });

This works fine, when I click the User Properties on the Text menu, it opens my modal:

image

My problem is that before, when typing { inside the text, it would open the menu, based on the autocomplete menu trigger: https://docs.unlayer.com/docs/merge-tags#autocomplete-menu-trigger

Since I don't have the menu anymore (but the Modal), I'd like to open the same modal. Is there a listener that I should register to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant