npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-material-autocomplete-fix

v1.0.0-beta-15.9

Published

Material Design for Vue.js with new autocomplete component

Downloads

5

Readme

vue-material-autocomplete-fix


This is an extended version of vue-material. Everything is same as is from vue-material.

Component: MdAutocomplete2

This package adds a new component MdAutocomplete2 and extended version of MdAutocomplete with a number of fixes and new features.

New features and fixes

Custom CSS class

  • Use mdContentClasses prop to pass a custom class to the container of the search result box. Also, a class named md-autocomplete-menu-content is always added to the container of the search result box.

Better navigation and selection using keyboard

  • Fix keyboard ArrowUp and ArrowDown navigation.
  • By default, the the top-most item of the suggested results is highlighted.
  • On pressing Enter or Tab, the highlighted items is selected and populated in the input field. The suggestion results popup hides.
  • While the suggestion popup is not showing, it can be opened
    • By pressing ArrowUp and ArrowDown, Delete, Backspace keys, while the input field is in focus.
    • By pressing Enter while the input field is in focus, provided that the input field is empty.
    • By starting typing in the input field (can be disabled setting mdOpenOnInput prop to false).
  • In case the suggestion popup has no result or is empty, a default empty message "No data available" is shown (without defining md-autocomplete-empty slot). The value can be modified using mdEmptyText prop.

Strict Mode

  • In case the suggestion popup has no result or is empty, but the input field has a value in it, which may not be the desired input value, it will be cleaned pressing Enter or Tab. This mode can be disabled setting mdCleanEmptyOnEnter prop to false.
  • mdStrict prop allows a value which is present in the options list. The input field's value, when a match is not found will be cleaned on focus or blur. While typing, text field characters will be restricted to combination of characters for which at-least one result is found. To disable this set mdString to false.

Show all results at first

  • By default, when the suggestion popup opens and there is already a value in the input field, the suggestion result for once, does not
    filter based on the input field's value. It shows all the values. The filtering starts in case the input value changes. This can be disabled using mdSkipFilterOnOpen prop to false.
  • When mdSkipFilterOnOpen is true and search box opens and if the input field already has a value, tt will first try to match the exact value from the input field with search options and highlight it.

New props

| Name | Type | Default | Description | |-----------------------|---------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| | mdEmptyText | String | "No data available" | Shows this message as default when there is no/empty suggested result. | | mdCleanEmptyOnEnter | Boolean | true | When the suggested result is empty, and Enter is pressed, the input field is cleaned. This can be disabled setting the value to false. | | mdOpenOnInput | Boolean | true | This adds additional feature along with mdOpenOnFocus. It allows to open the suggested results popup, in case it's closed when typing in the input box starts. | | mdSkipFilterOnOpen | Boolean | true | This allows to show all the suggested items in the popup when the suggested popup is open again. | | mdContentClasses | String or Array or Object | '' | This allows to add a custom css class to the search box. | | mdStrict | Boolean | true | Use strict mode. Value in the input field must match one of the values in options. |

Installation and Usage

Install Vue Material through npm or yarn

npm install vue-material-autocomplete-fix --save
yarn add vue-material-autocomplete-fix

* Others package managers like JSPM and Bower are not supported yet.

Import or require Vue and Vue Material in your code:

import Vue from 'vue'
import VueMaterial from 'vue-material-autocomplete-fix'
import 'vue-material-autocomplete-fix/dist/vue-material-autocomplete-fix.min.css'

Vue.use(VueMaterial)

Or use individual components:

import Vue from 'vue'
import { MdButton, MdContent, MdTabs } from 'vue-material-autocomplete-fix/dist/components'
import 'vue-material-autocomplete-fix/dist/vue-material-autocomplete-fix.min.css'

Vue.use(MdButton)
Vue.use(MdContent)
Vue.use(MdTabs)

License

MIT