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

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

Open
romangutkin opened this issue Sep 5, 2017 · 10 comments

Comments

@romangutkin
Copy link

No description provided.

@fritx
Copy link
Owner

fritx commented Sep 6, 2017

@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
Copy link
Author

romangutkin commented Sep 6, 2017 via email

@fritx
Copy link
Owner

fritx commented Sep 6, 2017

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
Copy link
Author

romangutkin commented Sep 6, 2017 via email

@fritx
Copy link
Owner

fritx commented Sep 6, 2017

that's unbelievable! 😆

@18736200656
Copy link

@Brimstedt

@18736200656
Copy link

@romangutkin

@18736200656
Copy link

@Brimstedt @fritx

@fritx
Copy link
Owner

fritx commented Aug 25, 2018

@18736200656 lol..

@zhengweipx
Copy link

Can only display the content after selection, not @

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

No branches or pull requests

4 participants