Giter VIP home page Giter VIP logo

vue-simple-search-dropdown's Introduction

Hey, I'm Romain Simon

📧 I am the founder and former CTO of Datananas, a sales engagement SaaS I started in 2014 and which acquired by Sarbacane in 2020.

🌱 In 2021, I left Datananas and started building Beanvest, an investment portfolio SaaS.

🌎 In 2022, I decided to take a year off to travel around the world until 2023.

⚡ You can learn more about me on my website https://romainsimon.com

Current projects

  • 🌱 Beanvest, investment portfolio tracker 
  • 👁️ appwatch, applications directory

Favorite tech stack

Node.js  TypeScript  JavaScript  Vue.js  Nuxt  MongoDB  Tailwind CSS  Tailwind UI

I often like to learn new things, but Javascript rules. My favorite tech stack for building SaaS is Node.js + Vue.js + MongoDB.

I really love using Tailwind CSS with Tailwind UI ❤️


Twitter: romainsimon Linkedin: romainsimon GitHub romainsimon

vue-simple-search-dropdown's People

Contributors

devoresyah avatar romainsimon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vue-simple-search-dropdown's Issues

Possibility to scroll over the options

At the moment, its only possible to have 6 options displayed in the dropdown container. Could you implement the functionality to scroll over the options if there are more than 6 matching options?

Default selected

I need to selected the default value.
So It can use this by adding new prop and watch function.

    props: {
...
      defaultValue: {
        type: Object,
        required: false,
        default: undefined,
        note: 'Default Selected'
      }
...
    watch: {
...
      defaultValue(v) {
        if (!v || !v.id) return;
        this.selectOption(v);
      }

Maximum Number of Items from the Dropdown List

I changed the max item to 10, still dropdown list has 6 elements. I also try to alter the parameter from "Dropdown.vue." It did not work as well.

Thanks

Changed the parameters in "vue-simple-search-dropdown.min.js" and it worked.

Dropdown

Is there also a option with filtering but not filtering out elements from UI only selecting the found element in dropdown ?

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

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.

Hide values until searched?

Say I have a dropdown list with lots of potential values. If those values exist immediately (I am referencing a JSON file for options and not using an API at this time).

Anyway, when I click into the search box, the dropdown opens with the default first 6 values.

If I set :maxItem="0", while I get the desired result of no dropdown on initial click, however, I can never return any values.

Is there a recommended option or will there need to be an enhancement to hide values until they are searched? It seems silly, but I suppose you could hook into the v-on:filter values and dynamically flip it from 0 to 6 or whatever, but this seems cumbersome.

Getting error "TypeError: Cannot read properties of undefined (reading '_c')"

Hello, I'm getting the error Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_c') at Proxy.n (:3001/js/webpack:/node_modules/vue-simple-search-dropdown/dist/vue-simple-search-dropdown.js:1) not sure if it's because I'm on Vue3? Here are the versions I think that might be related to this issue: "vue": "3.0.0", "vue-router": "^4.0.0-0", "vuex": "^4.0.0-0", "vue-simple-search-dropdown": "^1.0.1", Any suggestion is greatly appreciated!

Request: include prop for initial setting

First of all thank you very much for this module, it's nearly exactly what i was looking for.

The only option I am actually missing is an option-parameter which allows to make an initial setting in the drop-down.
Use Case: The very first time you use the module you want to make a setting.
But if you like to use the dropdown for an update, I actually see no way to pass forward the "selected" id which was set initially.
(e.g. book categories, the first time you select 'suspense' but then want to change it to 'drama'. So if you want to load the select with the initial category, I see actually no way to tell the module to have entry with id=x preselected)

Thx

oh a PD: what is the behaviour if I type some string which is not included in the options? which is the value of the option in that case? 'empty', '' or 'undefined'?
or put in other word, how can I validate that the selected value exists?

Up- and downkeys

Maybe it's an idea to interact with the up- and downkeys once the component is selected?

Redirect to selected path

Hi Romain,

I'm trying to implement your search plugin and have got the list from my GraphQL edges and the selection working, but I'm having a hard time figuring out how to submit the form on selection. I'm using Gridsome for the site and tried adding a method that uses route.push, but not having much luck. Any ideas?

I added a simplified version of my code here:
https://gist.github.com/smokeyfro/ddd97bac76fafac1a9c90f5c0c744bac

TIA,
Chris

Get dynamic values in list

Hello,

How I can initialize the options field with data returned from Ajax Request ?

Many thanks

Fabrice

Options for input not in list?

Hi
Will it be possible to use the list, but if user have another input not on the list, to keep this input in field? Something like "not restricted to list".

Christian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.