fritx / vue-at

At.js for Vue.
https://fritx.github.io/vue-at/
MIT License
529 stars 114 forks source link

is it possible to make the members search look in first letters instead of in the hole word? #20

Open romangutkin opened 6 years ago

fritx commented 6 years ago

@romangutkin there is a prop called filterMatch in the source code but not documented yet. https://github.com/fritx/vue-at/blob/dev/src/At.vue#L41

romangutkin commented 6 years ago

thank you very much! this is very helpful!

i wanted to ask another question.. is there a way to dismiss the suggestion box by clicking anywere outside of the box?

On Wed, Sep 6, 2017 at 3:56 AM, Fritz Lin notifications@github.com wrote:

@romangutkin https://github.com/romangutkin there is a prop called filterMatch in the source code but not documented yet. https://github.com/fritx/vue-at/blob/dev/src/At.vue#L41

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fritx/vue-at/issues/20#issuecomment-327343670, or mute the thread https://github.com/notifications/unsubscribe-auth/AbvorSt6kNBWU1DiEMj9eiOfBL2CB0euks5sfe28gaJpZM4PM9ru .

-- בברכה,

רומן גוטקין נייד: 0549732336

fritx commented 6 years ago

oh yes and no... i had implemented a prop called hideOnBlur in a personal version of react-at which is not yet published. i'm gonna include this feature in recent releases.

for now a workaround might look like this (not tested):

<at ref="at">
  <div class="editor"
    @focus="handleFocus"
    @blur="handleBlur"></div>
</at>

<script>
export default {
  data () {
    return {
      blurTimer: null,
      hideOnBlur: true
    }
  },
  methods: {
    handleFocus () {
      if (this.hideOnBlur) {
        clearTimeout(this.blurTimer)
      }
    },
    handleBlur () {
      if (this.hideOnBlur) {
        this.blurTimer = setTimeout(()=>{
          this.$refs.at.closePanel()
        }, 1500)
      }
    }
  }
}
</script>
romangutkin commented 6 years ago

that worked perfectly! thank you very much!

On Wed, Sep 6, 2017 at 11:46 AM, Fritz Lin notifications@github.com wrote:

oh yes and no... i had implemented a prop called hideOnBlur in a personal version of react-at https://github.com/fritx/react-at which is not yet published. i'm gonna include this feature in recent releases.

for now a workaround might look like this (not tested):

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fritx/vue-at/issues/20#issuecomment-327417664, or mute the thread https://github.com/notifications/unsubscribe-auth/AbvorWQYgTW36sGYIuwtOnefULtyfnUlks5sflvJgaJpZM4PM9ru .

-- בברכה,

רומן גוטקין נייד: 0549732336

fritx commented 6 years ago

that's unbelievable! 😆

18736200656 commented 5 years ago

@Brimstedt

18736200656 commented 5 years ago

@romangutkin

18736200656 commented 5 years ago

@Brimstedt @fritx

fritx commented 5 years ago

@18736200656 lol..

zhengweipx commented 3 years ago

Can only display the content after selection, not @