forked from projects/file-explorer
add file preview
This commit is contained in:
8
assets/controllers/file_preview_controller.js
Normal file
8
assets/controllers/file_preview_controller.js
Normal file
@ -0,0 +1,8 @@
|
||||
import {Controller} from "@hotwired/stimulus";
|
||||
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
|
||||
}
|
||||
}
|
@ -2,7 +2,6 @@ import { Controller } from '@hotwired/stimulus';
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
console.log(this.element);
|
||||
this.element.querySelector('input').addEventListener('change', () => {
|
||||
this.element.querySelector('button[type="submit"]').click();
|
||||
});
|
||||
|
Reference in New Issue
Block a user