coreui-react icon indicating copy to clipboard operation
coreui-react copied to clipboard

CPopover trigger for value {["hover", "click"]} in react is causing an error in the console

Open Kenaard opened this issue 3 years ago • 0 comments

Trigger in the CPopover is declared as below:

trigger?: Triggers | Triggers[];

Because of that, it should be possible to declare the trigger as {["hover", "click"]}. This is working in the example

https://codesandbox.io/s/wizardly-http-45refs?file=/src/App.js

but in the console, the error is raising.

Warning: Failed prop type: Invalid prop trigger of value click,hover supplied to CPopover, expected one of ["hover","focus","click"]. at CPopover (https://45refs.csb.app/node_modules/@coreui/react/dist/index.es.js:7247:21) at App

image

  • Operating system: Windows
  • Browser: Chrome, Firefox

Kenaard avatar Jul 11 '22 21:07 Kenaard