You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a filter controller that has different filtering controllers inside. The filtering controllers can submit the filter controller. I have two types of filter a date range using flatpicker and a users list that is a regular stimulus controller. each filter also provides a mechanism to "clear" its selection, after clearing they submit the form to update the results.
The issue I am seeing is that the date range picker controller does not recognize the outlets whereas the people filter controller does.
The following code is simplified and probably missing closing brackets.
There is another stimulus controller that declares the same outlet as the datepicker. Is for a list of checkboxes that upon selecting one, it will submit the form:
import{Controller}from"@hotwired/stimulus"// Connects to data-controller="people-picker-list"exportdefaultclassextendsController{statictargets=["checkboxes","searchInput","selected"];staticoutlets=["filter-form"];clearAll(evt){evt.preventDefault();this.checkboxesTargets.forEach((checkbox)=>{checkbox.checked=false;});this.selectedTarget.value="";if(this.hasFilterFormOutlet){this.filterFormOutlet.submit(evt);}}
The text was updated successfully, but these errors were encountered:
I have a filter controller that has different filtering controllers inside. The filtering controllers can submit the filter controller. I have two types of filter a date range using flatpicker and a users list that is a regular stimulus controller. each filter also provides a mechanism to "clear" its selection, after clearing they submit the form to update the results.
The issue I am seeing is that the date range picker controller does not recognize the outlets whereas the people filter controller does.
The following code is simplified and probably missing closing brackets.
Date range controller
The HTML is the following:
The HTML form (the filter stimulus controller) is defined like this:
There is another stimulus controller that declares the same outlet as the datepicker. Is for a list of checkboxes that upon selecting one, it will submit the form:
The text was updated successfully, but these errors were encountered: