Comments (4)
Thanks for the feedback!
It is a bug in the 'Group' because the emited events in recursive component are not forwarded to parent component when using v-cards as a wrapper for grouping controls. The solution will be to provide for 'group' type instead a wrapping .
I am working on...
from vuetify-form-base.
Hi @wotamann for now im using watch
with deep: true
property - its just workaround for me.
Thanks for answer and your work.
from vuetify-form-base.
Should work now, the attributes of v-card are not available anymore and the properties of the group must be defined via CSS.
CHANGE:
After the omission of v-card the type was changed to { type: 'group' } for better understanding
myValue: {
card1:{ name:'Harari', read:false, book:'C' },
}
mySchema: {
card1: { type:'group', title:'Base', flex:5, class:'ma-2 pa-2 display-2 elevation-4 blue--text blue',
schema: {
name: { type: 'text', color: 'blue', label:'Name'},
read: { type: 'checkbox', label: 'Ok', color: 'blue' },
book: { type: 'text', color: 'blue' },
}
}
}
from vuetify-form-base.
Hello!
I am having the same issue with fields of type: array
(fields inside of a given array item don't open/trigger, e.g. select fields)
I am watching change events
<v-form-base
class="with-vertical-scroll"
:schema="schema"
:model="model"
@change="clickHandler"
></v-form-base>
And my schema:
const schema = ref({
properties: {
type: "array",
schema: {
property: {
type: "select",
label: "Type",
itemText: "name",
returnObject: true,
items: $store.getters["types/list"],
},
name: {
type: "text",
label: "Name",
},
buttonRemoveProperty: {
...btnSchema,
label: "Remove",
}
}
},
buttonAddProperty: {
...btnSchema,
label: "Add",
},
});
const schema = ref({
properties: {
type: "array",
schema: {
type: {
...selectSchema,
label: "Property",
items: ["prop1", "prop2"],
},
buttonRemoveProperty: {
...btnSchema,
label: "Remove",
},
},
},
buttonAddProperty: {
...btnSchema,
label: "Add",
},
});
// function to handle change events
function clickHandler(event) {
console.log(event);
if (event.key === "buttonAddProperty") {
model.value.properties.push(defaultProperty);
} else if (event.key === "buttonRemoveProperty") {
const [index] = event.index;
model.value.properties.splice(index, 1);
}
console.log(model.value);
}
}
So basically, 2 things happen (either or):
- With
@change="clickHandler"
, the property select dropdown does not open on click. Not only selects, but any field won't work e.g. text-inputs won't be "focusable" to start typing. But clicking the buttons does add/remove items, so the change fires correctly. - If I remove the
@change="clickHandler"
, then the property select dropdown opens on click, but obviously no add/remove of array items is handled.
So basically the array type is somehow conflicting with the fields inside each of its array items.
P.S. Strangely enough, scenario 1. starts working after hot-module-reloading (so when dev server serves a change I made in the code), but if I do a full page refresh, the issue returns.
Any help is greatly appreciated!
from vuetify-form-base.
Related Issues (20)
- Clearing date picker doesn't clear the model value
- Failed to resolve directive: click-outside HOT 2
- How can I wrap the inputs in my own element?
- Vue3 + Vuetify3 HOT 5
- Typescript support HOT 1
- Why package.json scripts is empty?
- v-form-base not rendered in production mode HOT 2
- `pattern` doesn't allow for regex flags HOT 1
- Feature Request: Can you please add a "Description" field made of append icon with tooltip?
- Using axios api calls
- Custom Component With Slots
- Add "ClickOutside" to the required directives for preloading in docu
- Which Json Schema Library shoud I choose? HOT 1
- Hidden groups in an array
- Object Bindings
- How to bind properties? HOT 1
- How to disable the default no-gutters?
- Checkbox returns NULL when it should return FALSE HOT 3
- How to use v-form-base in a v-for loop? HOT 2
- Cant Render custom components HOT 4
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 vuetify-form-base.