material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

Popover anchorEl not documented

Open TrySpace opened this issue 10 years ago • 3 comments

The prop anchorEl that I see in the example, is not documented, described or explained.

Also, the example given is not a very common usecase. The code is good for the example elements we see, but not as a code example. What I mean is, seing the different options in action is good, but the example should be very simple and minimal.

Maybe the documentations should also more clearly state which props are mandatory, before the optional ones.

I'm not using anchorEl right now, and get the error 'Cannot read property 'getBoundingClientRect' of nullthis should be caught before trying to access theel`.

I also don't see .isRequired with the propTypes, while I think a prop like open would certainly be required to be useful. Unless the idea is to have the popover open permanently, but would suggest using Paper for that.

TrySpace avatar Dec 16 '15 10:12 TrySpace

@TrySpace Thanks for your feedback, the format of the docs has changed considerably.

The prop anchorEl that I see in the example, is not documented.

The propType are now documented (automatically from comments in the source code).

but the example should be very simple and minimal.

We have added a simple example.

oliviertassinari avatar Feb 01 '16 08:02 oliviertassinari

Where exactly is this "simple example"?

JGallardo avatar Mar 19 '19 23:03 JGallardo

@JGallardo Here https://next.material-ui.com/utils/popover/#simple-popover?

oliviertassinari avatar Mar 19 '19 23:03 oliviertassinari