Skip to content

Commit

Permalink
Replace defaultProps with default parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Onurcankaratay committed Oct 7, 2024
1 parent b7dbe75 commit c06c4c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ const FamilySelectionDropdown = React.memo(function FamilySelectionDropdown(prop
<span>Family <strong>{pedigreeFamiliesIdx + 1}</strong></span>
);
return (
<DropdownButton onSelect={onSelect} title={title} variant="outline-dark" className="ms-05" alignRight>
<DropdownButton onSelect={onSelect} title={title} variant="outline-dark" className="ms-05" align="end">
{
familiesWithViewPermission.map(function(family, i){
const { original_pedigree: pf = null } = family;
Expand Down Expand Up @@ -347,7 +347,7 @@ const FamilySelectionDropdown = React.memo(function FamilySelectionDropdown(prop
/** No longer in use for UX reasons; keeping it around temporarily in case people want it back */
const ShowAsDiseasesDropdown = React.memo(function ShowAsDiseasesDropdown({ showAsDiseases, onSelect }){
return (
<DropdownButton className="ms-05" onSelect={onSelect} title={showAsDiseases} variant="outline-dark" alignRight>
<DropdownButton className="ms-05" onSelect={onSelect} title={showAsDiseases} variant="outline-dark" align="end">
<DropdownItem active={showAsDiseases === "Phenotypic Features"} eventKey="Phenotypic Features">Phenotypic Features</DropdownItem>
<DropdownItem active={showAsDiseases === "Disorders"} eventKey="Disorders">Disorders</DropdownItem>
</DropdownButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import { WorkflowGraphSectionControls } from './WorkflowGraphSectionControls';
import { FullHeightCalculator } from './../FullHeightCalculator';
import { ProvenanceGraphOptionsStateController } from './ProvenanceGraphOptionsStateController';

export const ProvenanceGraphTabView = React.memo(function ProvenanceGraphTabView(props){
export const ProvenanceGraphTabView = React.memo(function ProvenanceGraphTabView({
graphSteps = null,
heading = <span>Provenance</span>,
...props
}) {
const {
heading,
graphSteps = null,
height: fullVizSpaceHeight,
windowWidth,
toggleAllRuns,
Expand Down Expand Up @@ -70,12 +72,8 @@ export const ProvenanceGraphTabView = React.memo(function ProvenanceGraphTabView
</div>
);
});
ProvenanceGraphTabView.getTabObject = function ({
graphSteps = null,
heading = <span>Provenance</span>,
...props
}) {
const { windowWidth, windowHeight, isLoadingGraphSteps } = props;
ProvenanceGraphTabView.getTabObject = function(props){
const { windowWidth, windowHeight, isLoadingGraphSteps, graphSteps } = props;
const stepsExist = Array.isArray(graphSteps) && graphSteps.length > 0;
let icon;
if (isLoadingGraphSteps){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function RowSpacingTypeSelect(props){
"wide" : "Spread"
};
return (
<DropdownButton onSelect={onSelect} title={titleMap[rowSpacingType]} variant="outline-dark" alignRight>
<DropdownButton onSelect={onSelect} title={titleMap[rowSpacingType]} variant="outline-dark" align="end">
<DropdownItem active={rowSpacingType === "compact"} eventKey="compact">Centered</DropdownItem>
<DropdownItem active={rowSpacingType === "stacked"} eventKey="stacked">Stacked</DropdownItem>
<DropdownItem active={rowSpacingType === "wide"} eventKey="wide">Spread</DropdownItem>
Expand Down

0 comments on commit c06c4c9

Please sign in to comment.