diff --git a/demo/src/FlatParametersTab.js b/demo/src/FlatParametersTab.js index 86f71f35..dc49a8c1 100644 --- a/demo/src/FlatParametersTab.js +++ b/demo/src/FlatParametersTab.js @@ -101,6 +101,101 @@ const EXAMPLE_PARAMETERS = [ defaultValue: ['EQ', 'TP', 'SSH', 'SV'], possibleValues: ['EQ', 'TP', 'SSH', 'SV'], }, + { + name: 'iidm.export.xml.extensions', + type: 'STRING_LIST', + description: 'The list of exported extensions', + defaultValue: [ + 'generatorShortCircuit', + 'identifiableShortCircuit', + 'slackTerminal', + 'entsoeArea', + 'coordinatedReactiveControl', + 'linePosition', + 'baseVoltageMapping', + 'voltagePerReactivePowerControl', + 'substationPosition', + 'cgmesControlAreas', + 'loadAsymmetrical', + 'cgmesTapChangers', + 'branchObservability', + 'generatorFortescue', + 'startup', + 'branchStatus', + 'cgmesDanglingLineBoundaryNode', + 'cgmesLineBoundaryNode', + 'busbarSectionPosition', + 'threeWindingsTransformerToBeEstimated', + 'injectionObservability', + 'cgmesSvMetadata', + 'measurements', + 'twoWindingsTransformerPhaseAngleClock', + 'generatorShortCircuits', + 'entsoeCategory', + 'hvdcOperatorActivePowerRange', + 'twoWindingsTransformerFortescue', + 'hvdcAngleDroopActivePowerControl', + 'standbyAutomaton', + 'voltageLevelShortCircuits', + 'twoWindingsTransformerToBeEstimated', + 'generatorActivePowerControl', + 'discreteMeasurements', + 'secondaryVoltageControl', + 'cimCharacteristics', + 'cgmesSshMetadata', + 'position', + 'detail', + 'threeWindingsTransformerPhaseAngleClock', + 'lineFortescue', + 'activePowerControl', + 'threeWindingsTransformerFortescue', + ], + possibleValues: [ + 'generatorShortCircuit', + 'identifiableShortCircuit', + 'slackTerminal', + 'entsoeArea', + 'coordinatedReactiveControl', + 'linePosition', + 'baseVoltageMapping', + 'voltagePerReactivePowerControl', + 'substationPosition', + 'cgmesControlAreas', + 'loadAsymmetrical', + 'cgmesTapChangers', + 'branchObservability', + 'generatorFortescue', + 'startup', + 'branchStatus', + 'cgmesDanglingLineBoundaryNode', + 'cgmesLineBoundaryNode', + 'busbarSectionPosition', + 'threeWindingsTransformerToBeEstimated', + 'injectionObservability', + 'cgmesSvMetadata', + 'measurements', + 'twoWindingsTransformerPhaseAngleClock', + 'generatorShortCircuits', + 'entsoeCategory', + 'hvdcOperatorActivePowerRange', + 'twoWindingsTransformerFortescue', + 'hvdcAngleDroopActivePowerControl', + 'standbyAutomaton', + 'voltageLevelShortCircuits', + 'twoWindingsTransformerToBeEstimated', + 'generatorActivePowerControl', + 'discreteMeasurements', + 'secondaryVoltageControl', + 'cimCharacteristics', + 'cgmesSshMetadata', + 'position', + 'detail', + 'threeWindingsTransformerPhaseAngleClock', + 'lineFortescue', + 'activePowerControl', + 'threeWindingsTransformerFortescue', + ], + }, ]; export const FlatParametersTab = () => { @@ -124,6 +219,9 @@ export const FlatParametersTab = () => { onChange={onChange} variant={'standard'} showSeparator + selectionWithDialog={(param) => + param?.possibleValues?.length > 10 + } /> diff --git a/src/components/MultipleSelectionDialog/MultipleSelectionDialog.js b/src/components/MultipleSelectionDialog/MultipleSelectionDialog.js index 75c7002f..0f45a0e7 100644 --- a/src/components/MultipleSelectionDialog/MultipleSelectionDialog.js +++ b/src/components/MultipleSelectionDialog/MultipleSelectionDialog.js @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { Dialog, DialogContent, Divider } from '@mui/material'; +import { Dialog, DialogContent, List } from '@mui/material'; import DialogTitle from '@mui/material/DialogTitle'; import { FormattedMessage } from 'react-intl'; import FormControlLabel from '@mui/material/FormControlLabel'; @@ -43,68 +43,60 @@ const MultipleSelectionDialog = ({ }; return ( - + {titleId} - - - - - } - control={ - - } - /> - + + + + } + control={ + + } + /> - {options.map((option, index) => { - const optionId = option?.id ?? option; - const label = getOptionLabel(option); - return ( - - - - handleOptionSelection( - optionId - ) + + + {options.map((option) => { + const optionId = option?.id ?? option; + const label = getOptionLabel(option); + return ( + + + + handleOptionSelection( + optionId + ) + } + /> } /> - } - /> - - {/*All rows contain 3 options, and we add divider after each row*/} - {(index + 1) % 3 === 0 && ( - - - - )} - - ); - })} + + + ); + })} + +