mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 01:19:45 +08:00
2df11184f4
* auto demo * chore: update demo snapshot * fix: trigger mock ref logic * chore: try 2 test case * chore: more snapshot * chore: update snapshot * chore: fix ts * chore: split test * test: Update test case * chore: fix test order
9 lines
353 B
JavaScript
9 lines
353 B
JavaScript
import * as React from 'react';
|
|
import Trigger from 'rc-trigger/lib/mock';
|
|
import { TriggerMockContext } from '../shared/demoTest';
|
|
|
|
export default React.forwardRef((props, ref) => {
|
|
const mergedPopupVisible = React.useContext(TriggerMockContext) ?? props.popupVisible;
|
|
return <Trigger {...props} ref={ref} popupVisible={mergedPopupVisible} />;
|
|
});
|