Merge pull request #717 from ajford/spool_edit_weight_iss477
Fix Spool Edit page Empty Weight and Initial Weight bug
This commit is contained in:
@@ -131,8 +131,8 @@ export const SpoolEdit: React.FC<IResourceComponentsProps> = () => {
|
||||
const [usedWeight, setUsedWeight] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
const newFilamentWeight = selectedFilament?.weight || 0;
|
||||
const newSpoolWeight = selectedFilament?.spool_weight || 0;
|
||||
const newFilamentWeight = getFilamentWeight();
|
||||
const newSpoolWeight = getSpoolWeight();
|
||||
if (newFilamentWeight > 0) {
|
||||
form.setFieldValue("initial_weight", newFilamentWeight);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user