Moved projects selector to a Stimulus controller
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
class ProjectsSelectorController extends Controller {
|
||||
static values = {
|
||||
frame: String
|
||||
}
|
||||
|
||||
changeProject(event) {
|
||||
const href = event.target.value
|
||||
Turbo.visit(href, {action: 'advance', frame: this.frameValue})
|
||||
}
|
||||
}
|
||||
|
||||
export default ProjectsSelectorController
|
||||
Reference in New Issue
Block a user