Skip to content

Commit c50ce77

Browse files
committed
fix: don't warn about eventOrAnchorEl when variant is dialog
fix #118
1 parent 67ac8da commit c50ce77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export function usePopupState({
142142
: undefined
143143

144144
const doOpen = (state: CoreState): CoreState => {
145-
if (!eventOrAnchorEl && !state.setAnchorElUsed) {
145+
if (!eventOrAnchorEl && !state.setAnchorElUsed && variant !== 'dialog') {
146146
warn(
147147
'missingEventOrAnchorEl',
148148
'eventOrAnchorEl should be defined if setAnchorEl is not used'

0 commit comments

Comments
 (0)