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

Provide cleaner API for `anchor` prop of Menu

Open ranile opened this issue 4 years ago • 0 comments

Menu's anchor prop take has signature of anchor: Option<web_sys::HtmlElement>. It's clunky and difficult to use. For example, need to have HtmlElement of the element which isn't possible to obtain in view before returning. The only method of setting it right now that I know of is by using WeakComponentLink::<MatMenu>::set_anchor in after the component is rendered. We need to provide a more elegant API for this.

ranile avatar May 19 '21 18:05 ranile