/* eslint-disable no-new */ /* global Vue */ /* global UsersSelect */ module.exports = Vue.extend({ name: 'filter-user', props: { toggleClassName: { type: String, required: true, }, dropdownClassName: { type: String, required: false, default: '', }, toggleLabel: { type: String, required: true, }, fieldName: { type: String, required: true, }, nullUser: { type: Boolean, required: false, default: false, }, projectId: { type: Number, required: true, }, }, mounted() { new UsersSelect(null, this.$refs.dropdown); }, computed: { currentUsername() { return gon.current_username; }, dropdownTitle() { return `Filter by ${this.toggleLabel.toLowerCase()}`; }, inputPlaceholder() { return `Search ${this.toggleLabel.toLowerCase()}`; }, }, template: `