Skip to content

Conversation

@luisvquintas
Copy link

Hi @kevinongko!

I decided to close the last PR and start developing again.

When the value is empty or null, don't format the field so that the placeholder can be displayed, using empty props.

<vue-numeric :empty="true" v-model="price"></vue-numeric>

I believe that in this version, all bugs have been resolved.

@kevinongko
Copy link
Owner

Hi @luisvquintas ,

I found a bug when using this sample code below

<template> <div id="app"> <vue-numeric currency="$" :empty="true" placeholder="sometext" v-model="money" precision="2" > </vue-numeric> </div> </template> <script> import VueNumeric from 'vue-numeric'  export default {  name: 'app',   components: {  VueNumeric  },   data () {  return {  money: 100 // default value  }  } } </script>

the input show the placeholder instead of the default value initially.

@kevinongko
Copy link
Owner

I just add contribution guidelines make sure to check it out :)

@codetheorist
Copy link

@kevinongko I feel that this is a non-issue as the idea of :empty=true is to show the placeholder so this works until the logic determines that input does I fact have a value.

@luisvquintas I feel this may work if you swap the order of the :empty and v-model attributes inside of the component template.

@kevinongko
Copy link
Owner

I fixed the inconsistent placeholder in v2.0.0

@kevinongko kevinongko closed this Sep 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants