Skip to content

Commit

Permalink
New tap changer table for two windings transformer (#1091)
Browse files Browse the repository at this point in the history
Change the tap changer table inside the two windings transformer creation dialog and create a reusable drag and drop table.
Mutualize the code between ratio tap changer and phase tap changer.
Increase the rendering speed of TableNumericalInput : mui/material-ui#34436
Reorganize code and do some refactoring.

Signed-off-by: Florent MILLOT <[email protected]>
  • Loading branch information
flomillot authored Feb 22, 2023
1 parent 4c833e5 commit 0c033da
Show file tree
Hide file tree
Showing 30 changed files with 1,367 additions and 1,253 deletions.
5 changes: 5 additions & 0 deletions src/components/dialogs/dialogUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ export function toIntOrEmptyValue(val) {
return parseInt(val) || '';
}

export function parseIntData(val, defaultValue) {
const intValue = parseInt(val);
return isNaN(intValue) ? defaultValue : intValue;
}

export function sanitizeString(val) {
return val.trim() === '' ? null : val.trim();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Grid from '@mui/material/Grid';
import { Box } from '@mui/material';
import BooleanInput from 'components/refactor/rhf-inputs/boolean-input';
import SwitchInput from '../../rhf-inputs/booleans/switch-input';
import IntegerInput from 'components/refactor/rhf-inputs/integer-input';
import {
CURRENT_NUMBER_OF_SECTIONS,
Expand Down Expand Up @@ -78,7 +78,7 @@ const ShuntCompensatorCreationForm = ({ studyUuid, currentNode }) => {
);

const identicalSectionsField = (
<BooleanInput
<SwitchInput
name={IDENTICAL_SECTIONS}
label={'ShuntIdenticalSections'}
formProps={disabledChecked}
Expand Down

This file was deleted.

Loading

0 comments on commit 0c033da

Please sign in to comment.