Export startCompletionEffect and closeCompletionEffect #25

Closed
ankoh wants to merge 1 commit from main into main
ankoh commented 2024-08-18 19:09:27 +02:00 (Migrated from github.com)

This commit is exposing startCompletionEffect and closeCompletionEffect.
It allows us to modify StateFields whenever the completion popup opens/closes.

This commit is exposing startCompletionEffect and closeCompletionEffect. It allows us to modify StateFields whenever the completion popup opens/closes.
ankoh commented 2024-08-18 19:13:56 +02:00 (Migrated from github.com)

Let me know if there's a better way to update StateFields whenever the completion is either applied or aborted.
I thought about hooking into Candidate apply, CompletionResult validFor and CompletionResult map, but you're still missing some cases where the completion is, for example, canceled by deleting the whole word.

Let me know if there's a better way to update StateFields whenever the completion is either applied or aborted. I thought about hooking into Candidate apply, CompletionResult validFor and CompletionResult map, but you're still missing some cases where the completion is, for example, canceled by deleting the whole word.
ankoh commented 2024-08-18 19:16:25 +02:00 (Migrated from github.com)

Ah, I just found that mine is a duplicate of https://github.com/codemirror/autocomplete/pull/24 , sorry.

Ah, I just found that mine is a duplicate of https://github.com/codemirror/autocomplete/pull/24 , sorry.
ankoh commented 2024-08-18 19:16:51 +02:00 (Migrated from github.com)

Feel free to close if you don't like exposing the effect, I'll use the workaround of #24 in the meantime.

Feel free to close if you don't like exposing the effect, I'll use the workaround of #24 in the meantime.
marijnh commented 2024-08-18 20:20:22 +02:00 (Migrated from github.com)

Yeah these are really intended to be internal.

Yeah these are really intended to be internal.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/autocomplete!25
No description provided.