Fixed bugs.
This commit is contained in:
@@ -65,9 +65,10 @@ const AssignmentsByAsset = () => {
|
||||
return {foundAsset}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if(assetIdInput) assetIdInput.focus()
|
||||
})
|
||||
//This works too well. The field always gets focus anytime anything is typed anywhere.
|
||||
// useEffect(() => {
|
||||
// if(assetIdInput) assetIdInput.focus()
|
||||
// })
|
||||
|
||||
const unassign = () => {
|
||||
// Open the dialog to get condition and comment.
|
||||
@@ -81,7 +82,10 @@ const AssignmentsByAsset = () => {
|
||||
|
||||
if(unassign === true) {
|
||||
// Call assets.unassign(assetId, comment, condition, conditionDetails, date)
|
||||
Meteor.call('assets.unassign', foundAsset.assetId, unassignComment, unassignCondition, unassignConditionDetails)
|
||||
Meteor.call('assets.unassign', foundAsset.assetId, unassignComment, unassignCondition, unassignConditionDetails, (err, result) => {
|
||||
if(err) console.error(err)
|
||||
else if(assetIdInput) assetIdInput.focus()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user