I am looking for the most effective way to check all selected options in my select dropdown when data is being edited.
Here is an example of my select dropdown that supports multiple selections:
<select name="tags[]" class="multi-select" multiple="" id="mytags">
<% tags.map((t)=> { %>
<option value="<%= t.tagName %>"><%= t.tagName %></option>
<% }) %>
</select>
My questions are:
Does EJS have a built-in feature to automatically select all chosen options?
What is considered the best practice for handling this scenario?
Your response will greatly aid in my understanding.