Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to use name in dropdown with symbol + or () #26

Open
sandrocantagallo opened this issue Apr 27, 2022 · 0 comments
Open

unable to use name in dropdown with symbol + or () #26

sandrocantagallo opened this issue Apr 27, 2022 · 0 comments

Comments

@sandrocantagallo
Copy link

if you use in dropdown list a name that have symbol: + is impossible to selected it.
Same problem if you use symbol ( and )

The problem is in: node_modules/vue-simple-search-dropdown/dist/vue-simple-search-dropdown.js

Line: 165

for now i fix writing something like that:

var r = new RegExp(this.searchFilter.replace("+", "").replace("(", "").replace(")", ""), "ig");

But is just a workaround.

I also changed method selectOption:

methods: {
                    selectOption: function t(e) {
                        this.selected = e;
                        this.optionsShown = false;
                        this.searchFilter = this.selected.name;
                        //console.log(this.selected);
                        //console.log(this.searchFilter   );
                        //console.log(this.selected.name.replace("(", "").replace(")", ""));
                        this.selected.name = this.selected.name.replace("(", "").replace(")", "");
                        this.$emit("selected", this.selected);
                    },

In this way element don't show error and are selectable.

Please fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant