You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm sorry if this is already enabled I didn't see it in the docs.
Anyhow, I recently used Vue, and I think they had a good idea on quick implementation on what button to listen to. I think Svelte could benefit from this.
right now it's something like this in a function
function riode(e){
if (e.key = "Enter") {
// whatever//
}
}
I think we can just outright scrape the entire if statement and just on the onclick or whatever have
on:keypress|Enter={function} to shorten it entirely.
The text was updated successfully, but these errors were encountered:
This has come up before in #3193, #4427, #5795, and maybe others, and has previously been rejected because the number of keystrokes saved really is quite minimal. You can just do on:keypress={(e) => e.key === 'Enter' && whatever()}, which is a lot more explicit, and introduces no new API surface area to document, or test, or fix bugs in.
i'm sorry if this is already enabled I didn't see it in the docs.
Anyhow, I recently used Vue, and I think they had a good idea on quick implementation on what button to listen to. I think Svelte could benefit from this.
right now it's something like this in a function
function riode(e){
if (e.key = "Enter") {
// whatever//
}
}
I think we can just outright scrape the entire if statement and just on the onclick or whatever have
on:keypress|Enter={function} to shorten it entirely.
The text was updated successfully, but these errors were encountered: