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

Feature requests - inputs #97

Open
siloam opened this issue Dec 10, 2021 · 6 comments
Open

Feature requests - inputs #97

siloam opened this issue Dec 10, 2021 · 6 comments

Comments

@siloam
Copy link

siloam commented Dec 10, 2021

  1. A way to provide masks for textfields
  2. A way to hide spinners (arrows) for number fields
@elf-mouse
Copy link
Member

About request loading, I prefer to use global masks, like this:

<div>
  <app-layout>
    Your template
  </app-layout>
  <loading-layout v-if="$store.isLoading"></loading-layout>
</div>

@siloam
Copy link
Author

siloam commented Dec 13, 2021

I ment input masks. It's a way to control input. Sometimes formating and pre-validation of data is needed,

@rodrigobraga
Copy link

Hi guys, is it possible using something like maska with BalmUI?

@rodrigobraga
Copy link

rodrigobraga commented Jan 13, 2023

@siloam @elf-mouse I am trying the sample below without success. Do you have any idea to solve this?

<template>

    <ui-textfield
      v-model="model"
      :attrs="{ 'v-maska': '', 'data-maska': '#####-###'}"
      required
      maxlength="9">
        Example
      </ui-textfield>

</template>

<script>

import { vMaska } from "maska"

export default {

  directives: { maska: vMaska },

  data () {
    return {
        model: null
    }
  }
}
</script>

@elf-mouse
Copy link
Member

Hi @rodrigobraga , you can use maska like this:

  • main.js

    import { vMaska } from 'maska';
    
    const app = createApp(App);
    app.directive('maska', vMaska);
  • app.vue

    <ui-textfield
      v-model="value"
      v-maska
      :attrs="{
        'data-maska': '#-#'
      }"
    ></ui-textfield>

@rodrigobraga
Copy link

@elf-mouse Thanks!

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

3 participants