feat: language filter
This commit is contained in:
@@ -14,13 +14,19 @@ export default class extends Controller {
|
||||
|
||||
options = []
|
||||
|
||||
connect() {
|
||||
fetch(`/torrentio/movies/${this.imdbIdValue}`)
|
||||
.then(res => res.text())
|
||||
.then(response => {
|
||||
this.element.innerHTML = response;
|
||||
this.options = this.element.querySelectorAll('tbody tr');
|
||||
});
|
||||
async connect() {
|
||||
await this.setOptions();
|
||||
}
|
||||
|
||||
async setOptions() {
|
||||
if (this.options.length === 0) {
|
||||
await fetch(`/torrentio/movies/${this.imdbIdValue}`)
|
||||
.then(res => res.text())
|
||||
.then(response => {
|
||||
this.element.innerHTML = response;
|
||||
this.options = this.element.querySelectorAll('tbody tr');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
listTargetConnected(target) {
|
||||
|
||||
Reference in New Issue
Block a user