I'm trying to create a simple 'location editor' using the angular-schema-form framework. The plan is to build a map editor widget with a draggable pin.
The json schema for the item is relatively simple:
location: {
title: "Location",
type: "object",
format: "location",
properties: {
latitude: {
"type": "number"
},
longitude: {
"type": "number"
}
}
}
This is as far as I've got: http://ift.tt/17pSSou
As you can see, editing the name works fine, but editing either of the two location fields doesn't update the model (unless you clear the inputs) and the validation only occurs on the second of the two input elements.
I'm not sure where to look next - I can't find any other examples of an object editor (all examples on github deal with editing a single 'string' item).
Is this supported, and if so, where have I gone wrong?
Cheers!
Aucun commentaire:
Enregistrer un commentaire