nth-cloud / ng-mentions

Rich Mentions Component for Angular
http://nth-cloud.github.io/ng-mentions
MIT License
12 stars 12 forks source link

[feature] trigger by pressing a button #15

Closed jaymehtasa closed 3 years ago

jaymehtasa commented 3 years ago

Can you suggest a workaround to trigger the mention list by pressing a button? example use case shown in following image, clicking on "@" button it should trigger the mention list.

image

trickeyone commented 3 years ago

@jaymehtasa Sorry I missed this. I'm not really sure, tbh. Is there a reason you wouldn't use the default triggering setup? If you can give me a use-case, it'd be easier to help.

no-response[bot] commented 3 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

jaymehtasa commented 3 years ago

@trickeyone Sorry for late reply.

that is the expected UX, many apps like Trello allowed click on "@" button and also auto triggers by typing "@".

Let me know if possible for you to help.

trickeyone commented 3 years ago

@jaymehtasa I understand that it's your desired functionality but it isn't the expected UX. I based the component on other standard autocomplete components. I haven't used Trello, so I'm not familiar to what you're looking for. It kinda seems like you're looking for more of a typeahead component rather than autocomplete. Is your input element a standard input text element or a textarea?

jaymehtasa commented 3 years ago

@trickeyone Please find attached Video of Trello, it works when we typr "@" or click on "@" button both, I ned to achieve same UX.

https://user-images.githubusercontent.com/8104992/110584677-997abc80-8195-11eb-85a6-6d7be28cd06a.mov

jaymehtasa commented 3 years ago

@trickeyone also github is ideal example, see attached Video.

https://user-images.githubusercontent.com/8104992/110584834-dd6dc180-8195-11eb-872f-f681f1310dbf.mov

jaymehtasa commented 3 years ago

@trickeyone sorry for the follow-up, but any help you can offer here?

trickeyone commented 3 years ago

@jaymehtasa Sorry, I've been tied up with work and haven't had a chance to look at this again. Form the Trello example, that looks more like a dropdown list that pops the selected item into the textarea. It looks to me like they utilize two different components to achieve that affect. For Github, it's a simple text-insertion like most typeahead components just without the text formatting that my component does. it just injects the text (i.e. @jaymehtasa) into wherever the cursor currently is in a plain textarea.

This formatting is the main sticking point. I can look at adding an externally callable method to trigger the popup/search initialization. This would essentially do the same as pressing the trigger key.

I'm still under a heavy workload at work, so I can't give you an ETA when this will be done.

stale[bot] commented 3 years ago

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue in 24 hours. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again!

trickeyone commented 3 years ago

closed with 285c3c6

trickeyone commented 3 years ago

@jaymehtasa I've added functionality that should cover the use-case you had. Sorry it took so horribly long. Life and work took precedence. See https://nth-cloud.github.io/ng-mentions/#/docs/mentions/examples > Basic example for usage.