Clear input fields on New Identity
Signed-off-by: James Ketrenos <james_gitlab@ketrenos.com>
This commit is contained in:
parent
a1787a172a
commit
d1fa906526
@ -61,6 +61,7 @@ class Identities extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
let params = window.location.search ? window.location.search.replace(/^\?/, "").split("&") : [],
|
||||
id;
|
||||
@ -426,6 +427,12 @@ function createNewIdenityEditor() {
|
||||
body: JSON.stringify(object)
|
||||
}).then(res => res.json()).then((identities) => {
|
||||
console.log("New identity: ", identities[0]);
|
||||
let inputs = editor.querySelectorAll("input");
|
||||
Array.prototype.forEach.call(inputs, (el) => {
|
||||
if (el.value) {
|
||||
el.value = "";
|
||||
}
|
||||
});
|
||||
const face = document.body.querySelector("#face-editor .face");
|
||||
loadFace(parseInt(face.getAttribute("face-id")));
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user