Comments (12)
Sure :)
from bootstrap-vue.
According to the Vue docs multiple types should be possible. I'm preparing a PR. 😃
from bootstrap-vue.
@samanthaming Thanks. will be fixed soon
from bootstrap-vue.
@samanthaming you should try ;) :
<b-form-input v-model="pPrice"
type="Number"
label="Product Price"
/>
from bootstrap-vue.
@mathlet0x Is it safe to close this issue ?
from bootstrap-vue.
I think the error still exists in v0.6.0. Am I missing something? Here's my code:
<template>
[...]
<b-form-input v-model.number="user.balance" type="Number" />
[...]
</template>
<script>
export default {
name: 'user-edit',
props: {
user: {
type: Object,
default: function () {
return {
user: {
name: 'User',
balance: 123
}
}
}
}
}
}
</script>
Just to make it clear: I'm passing a user object shaped like the default object when using this component.
from bootstrap-vue.
After some more time with Vue.js I think this is because the value passed to the component is actually a Number, but the input field requires a String. In my opinion the component should do the necessary casting itself.
from bootstrap-vue.
@riker09 Good idea :) I'll make a patch soon
from bootstrap-vue.
@pi0 Could the formatter be used for this? It should do type safe comparision, though. Currently the formatted value is never used, when, for example the Number 5 is compared to the casted String '5'
from bootstrap-vue.
Nevermind my last comment. I'm still very new to Vue.js and learning. You've set a prop constraint in the component form-input
, that is why I'm seeing this error in the console whenever I pass a Number. 🤦♂️
from bootstrap-vue.
@riker09 So fast reactions :)) Thanks mate
from bootstrap-vue.
I'm sick at home, so I got a little spare time at my hands. And I'm really diggin Vue.js. Now, when I can help some Open Source projects this really makes my day. 😄
from bootstrap-vue.
Related Issues (20)
- Library discovery difficulty
- Upgrade portal-vue to 3 HOT 1
- How to use it with vitest HOT 7
- bootstrap-vue components page in the site does not load
- Change to Vue 3.2.36+ causes app install to fail when running unit tests via Jest/Vue Test Utils HOT 1
- handling Punctuation in sorting HOT 2
- I'm trying to setup bootstrap-vue/nuxt but i got this error "Cannot restart nuxt: Cannot read properties of undefined (reading 'hook')" HOT 3
- Support for Tree View Component HOT 2
- the b-nav not switching tabs when clicking
- TS support for @vue/compat usage with vue3/optionsApi HOT 1
- Update to nuxt 3
- Set attributes on b-dropdown-group header
- vue 3.3.5+ in compat mode throws errors HOT 1
- b-form-checkbox assign is not a function HOT 16
- [Mobile devies] Cannot open tooltip again when call `this.$root.$emit("bv::hide::tooltip")`
- Sortable does not show HOT 1
- B-form-spinbutton : how to add two features : default value, and direction (+/-) on @change event HOT 3
- @row-selected in b-table not fired after calling multiple selectRow function
- -
- disabled buttons style radio-group displays the checked option as not checked
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-vue.