Skip to content

Commit

Permalink
[Fix] Workaround for out-of-range warning of material-ui component
Browse files Browse the repository at this point in the history
Fixes material-ui warning:
"""
You have provided an out-of-range value `http://onto.fel.cvut.cz/ontologies/fta-fmea-application/system/instance1574699916` for the select component.
Consider providing a value that matches one of the available options or ‘’.
The available values are “”.
"""
  • Loading branch information
blcham committed Jun 19, 2024
1 parent 45a4be7 commit 3ef836c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/appBar/AppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ const AppBar = ({ title, showBackButton = false, topPanelHeight }: Props) => {
select
InputLabelProps={{ shrink: false }}
className={classes.textfieldSelect}
value={selectedSystem ? selectedSystem.iri : ""}
value={
selectedSystem?.iri && systemsList.some((s) => s.iri === selectedSystem.iri)
? selectedSystem.iri
: ""
}
onChange={handleSystemChange}
disabled={dropdownDisabled}
>
Expand Down

0 comments on commit 3ef836c

Please sign in to comment.