mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
16 lines
No EOL
406 B
JavaScript
16 lines
No EOL
406 B
JavaScript
import {Controller} from "@hotwired/stimulus";
|
|
|
|
export default class extends Controller {
|
|
static targets = ["input"];
|
|
|
|
connect() {
|
|
if(!this.inputTarget) {
|
|
throw new Error("Target input not found");
|
|
}
|
|
}
|
|
|
|
load(event) {
|
|
//Use the data-value attribute to load the value of our target input
|
|
this.inputTarget.value = event.target.dataset.value;
|
|
}
|
|
} |