Skip to content

Commit

Permalink
add default values
Browse files Browse the repository at this point in the history
  • Loading branch information
eszthoff committed Mar 24, 2020
1 parent d67a405 commit bdfde31
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/Select/SuggestionsList/SuggestionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export function SuggestionsList<S>(props: Props<S>) {

SuggestionsList.defaultProps = {
useOptimizeRender: false,
inputValue: '',
};

SuggestionsList.displayName = 'SuggestionsList';
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ exports[`SuggestionsList should initially render component correctly 1`] = `
}
}
highlightedIndex={1}
inputValue=""
noSuggestionsPlaceholder="noSuggestionsPlaceholder"
suggestionToString={[Function]}
suggestions={
Expand Down Expand Up @@ -173,6 +174,7 @@ exports[`SuggestionsList should initially render component correctly 1`] = `
<MarkedText
inline={true}
key=".0"
marker=""
>
<Text
context="default"
Expand Down Expand Up @@ -206,6 +208,7 @@ exports[`SuggestionsList should initially render component correctly 1`] = `
<MarkedText
inline={true}
key=".0"
marker=""
>
<Text
context="default"
Expand Down Expand Up @@ -239,6 +242,7 @@ exports[`SuggestionsList should initially render component correctly 1`] = `
<MarkedText
inline={true}
key=".0"
marker=""
>
<Text
context="default"
Expand Down Expand Up @@ -272,6 +276,7 @@ exports[`SuggestionsList should initially render component correctly 1`] = `
<MarkedText
inline={true}
key=".0"
marker=""
>
<Text
context="default"
Expand Down Expand Up @@ -305,6 +310,7 @@ exports[`SuggestionsList should initially render component correctly 1`] = `
<MarkedText
inline={true}
key=".0"
marker=""
>
<Text
context="default"
Expand Down Expand Up @@ -338,6 +344,7 @@ exports[`SuggestionsList should initially render component correctly 1`] = `
<MarkedText
inline={true}
key=".0"
marker=""
>
<Text
context="default"
Expand Down Expand Up @@ -371,6 +378,7 @@ exports[`SuggestionsList should initially render component correctly 1`] = `
<MarkedText
inline={true}
key=".0"
marker=""
>
<Text
context="default"
Expand Down Expand Up @@ -404,6 +412,7 @@ exports[`SuggestionsList should initially render component correctly 1`] = `
<MarkedText
inline={true}
key=".0"
marker=""
>
<Text
context="default"
Expand Down Expand Up @@ -437,6 +446,7 @@ exports[`SuggestionsList should initially render component correctly 1`] = `
<MarkedText
inline={true}
key=".0"
marker=""
>
<Text
context="default"
Expand Down Expand Up @@ -573,6 +583,7 @@ exports[`SuggestionsList should render optimization list correctly 1`] = `
}
}
highlightedIndex={1}
inputValue=""
noSuggestionsPlaceholder="noSuggestionsPlaceholder"
suggestionToString={[Function]}
suggestions={
Expand Down
4 changes: 2 additions & 2 deletions src/components/TwoPaneView/TwoPaneView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export const TwoPaneView: React.FC<Props> = props => {

const { width: fullWidth } = blockEl.getBoundingClientRect();
const blockStyle = window.getComputedStyle(blockEl, null);
const paddingRight = parseInt(blockStyle.getPropertyValue('padding-right'), 10);
const paddingLeft = parseInt(blockStyle.getPropertyValue('padding-left'), 10);
const paddingRight = parseInt(blockStyle.getPropertyValue('padding-right'), 10) || 0;
const paddingLeft = parseInt(blockStyle.getPropertyValue('padding-left'), 10) || 0;

const leftEl = leftRef.current;
if (!leftEl) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports[`<TwoPaneView> that renders a two pane view should render correctly 1`]
"display": "none",
"height": 0,
"top": -0,
"width": NaN,
"width": 0,
}
}
>
Expand All @@ -36,7 +36,7 @@ exports[`<TwoPaneView> that renders a two pane view should render correctly 1`]
"display": "none",
"height": 0,
"top": -0,
"width": NaN,
"width": 0,
}
}
>
Expand Down

0 comments on commit bdfde31

Please sign in to comment.