-
-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Hey @mskocik,
first things first, thanks for this library! 🙏 It has been very useful for multiple of my side projects.
While recently using the create feature for the first time I have been encountering a behavior which doesn't seem right. Here's how to reproduce it:
- Set creatable to true and add
createFilter={() => true}(always deny creating) - Provide a few valid options to Svelecte
- Start searching for a valid option, select it using the arrow key and press Enter
My expectation would be that selecting any provided option would always work but the createFilter function seems to block it.
Here's a REPL that contains an example to reproduce the issue.
I've already had a look at the code and identified that the issue is probably in this block of code as it doesn't check which option is currently selected and just prevents the selection if the createFilter returns true.
Just wanted to double check with you whether I'm missing something here. Let me know what you think. 🙂