feat(iso): DateRangePicker-Zeitraum bei "Daten laden" anwenden
This commit is contained in:
@@ -19,9 +19,10 @@ type ModuleType = "ISO" | "TDR" | "RSL" | "KVZ";
|
||||
|
||||
interface ReportProps {
|
||||
moduleType: ModuleType;
|
||||
autoLoad?: boolean;
|
||||
}
|
||||
|
||||
const Report: React.FC<ReportProps> = ({ moduleType }) => {
|
||||
const Report: React.FC<ReportProps> = ({ moduleType, autoLoad = true }) => {
|
||||
const dispatch = useDispatch<AppDispatch>();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -178,12 +179,13 @@ const Report: React.FC<ReportProps> = ({ moduleType }) => {
|
||||
moduleKeywordMap,
|
||||
]);
|
||||
|
||||
// Automatisches Laden beim Mount und bei Änderungen
|
||||
// Automatisches Laden beim Mount und bei Änderungen (optional)
|
||||
useEffect(() => {
|
||||
if (!autoLoad) return;
|
||||
if (slotNumber !== null) {
|
||||
loadMessages();
|
||||
}
|
||||
}, [loadMessages, slotNumber]);
|
||||
}, [loadMessages, slotNumber, autoLoad]);
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user