Skip to content

Commit

Permalink
feat: add popupProps back
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Feb 14, 2022
1 parent 1c2b1b5 commit bf54a55
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/react-widgets/src/Combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ const ComboboxImpl: Combobox = React.forwardRef(function Combobox<TDataItem>(
onFocus,
inputProps,
listProps,
popupProps,
groupBy,
renderListItem,
renderListGroup,
Expand Down Expand Up @@ -482,6 +483,7 @@ const ComboboxImpl: Combobox = React.forwardRef(function Combobox<TDataItem>(
<FocusListContext.Provider value={list.context}>
{shouldRenderPopup && (
<Popup
{...popupProps}
dropUp={dropUp}
open={popupOpen}
transition={popupTransition}
Expand Down
3 changes: 3 additions & 0 deletions packages/react-widgets/src/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ export interface DatePickerProps<TLocalizer = unknown>
*/
dropUp?: boolean

popupProps: object
popupTransition?: React.ComponentType<TransitionProps>
popupComponent?: React.ComponentType<PopupProps>

Expand Down Expand Up @@ -333,6 +334,7 @@ const DatePicker = React.forwardRef(
inputProps,
calendarProps,
timeInputProps,
popupProps,
autoFocus,
tabIndex,
disabled,
Expand Down Expand Up @@ -573,6 +575,7 @@ const DatePicker = React.forwardRef(

{!!shouldRenderList && (
<Popup
{...popupProps}
dropUp={dropUp}
open={open}
role="dialog"
Expand Down
7 changes: 6 additions & 1 deletion packages/react-widgets/src/DropdownList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ const DropdownListImpl: DropdownList = React.forwardRef(function DropdownList<
onClick,
inputProps,
listProps,
popupProps,
renderListItem,
renderListGroup,
optionComponent,
Expand Down Expand Up @@ -576,6 +577,7 @@ const DropdownListImpl: DropdownList = React.forwardRef(function DropdownList<
</WidgetPicker>
{shouldRenderPopup && (
<Popup
{...popupProps}
dropUp={dropUp}
open={currentOpen}
transition={popupTransition}
Expand Down Expand Up @@ -610,7 +612,10 @@ const DropdownListImpl: DropdownList = React.forwardRef(function DropdownList<
/>
{showCreateOption && (
<AddToListOption onSelect={handleCreate}>
{localizer.messages.createOption(currentValue, currentSearch || '')}
{localizer.messages.createOption(
currentValue,
currentSearch || '',
)}
</AddToListOption>
)}
</Popup>
Expand Down
2 changes: 2 additions & 0 deletions packages/react-widgets/src/Multiselect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ const Multiselect: Multiselect = React.forwardRef(function Multiselect<
onFocus,
inputProps,
listProps,
popupProps,
renderListItem,
renderListGroup,
renderTagValue,
Expand Down Expand Up @@ -685,6 +686,7 @@ const Multiselect: Multiselect = React.forwardRef(function Multiselect<
<FocusListContext.Provider value={list.context}>
{shouldRenderPopup && (
<Popup
{...popupProps}
dropUp={dropUp}
open={currentOpen}
transition={popupTransition}
Expand Down
1 change: 1 addition & 0 deletions packages/react-widgets/src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export interface PopupWidgetProps {
containerClassName?: string

dropUp?: boolean
popupProps: Record<string, any>
popupTransition?: React.ComponentType<TransitionProps>
popupComponent?: React.ComponentType<PopupProps>

Expand Down

0 comments on commit bf54a55

Please sign in to comment.