all AI news
Stimulus Keyboard Event Filter
Dec. 19, 2023, 8:20 p.m. | JT Dev
DEV Community dev.to
What it was
In the last update of Stimulus v3.2.2
, the ability to filter the event by PageDown
and PageUp
keys was added.
Before that, in v3.2.1
, it looked like this:
<div data-action="keyup->myController#myfunction"></div>
and some like this...
import { Controller } from "stimulus";
export default class extends Controller {
connect() {
// Add a keydown event listener when the controller is connected to the DOM
document.addEventListener("keydown" …
data event export filter import keyboard keys stimulus update
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
AI Research Scientist
@ Vara | Berlin, Germany and Remote
Data Architect
@ University of Texas at Austin | Austin, TX
Data ETL Engineer
@ University of Texas at Austin | Austin, TX
Lead GNSS Data Scientist
@ Lurra Systems | Melbourne
Senior Machine Learning Engineer (MLOps)
@ Promaton | Remote, Europe
Data Analyst (Digital Business Analyst)
@ Activate Interactive Pte Ltd | Singapore, Central Singapore, Singapore