mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) cannot render the machine filters
if a default machines list was not provided to the machines-filters component, the component rendering is broken
This commit is contained in:
parent
1b930d2005
commit
498ed0d115
@ -21,7 +21,7 @@ interface MachinesFilterProps {
|
||||
export const MachinesFilter: React.FC<MachinesFilterProps> = ({ allMachines, onError, onApplyFilters, currentFilters, openDefault = false, instantUpdate = false }) => {
|
||||
const { t } = useTranslation('admin');
|
||||
|
||||
const [machines, setMachines] = useState<Machine[]>(allMachines);
|
||||
const [machines, setMachines] = useState<Machine[]>(allMachines || []);
|
||||
const [openedAccordion, setOpenedAccordion] = useState<boolean>(openDefault);
|
||||
const [selectedMachines, setSelectedMachines] = useState<Machine[]>(currentFilters || []);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user