MCPcopy Create free account
hub / github.com/angular-rust/yew-components / view

Method view

src/menu.rs:241–260  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

239 // ref=self.node_ref.clone()
240
241 fn view(&self) -> Html {
242
243 let link = self.props.link.borrow().clone().unwrap();
244
245 html! {
246 <div class="mdc-menu mdc-menu-surface" ref=self.node_ref.clone() ontransitionend=link.callback(|_| Self::Message::TransitionEnd)>
247 <ul class="mdc-list" role="menu" aria-hidden="true" aria-orientation="vertical" tabindex="-1">
248 <li class="mdc-list-item" role="menuitem" onclick=link.callback(|_| Self::Message::Close)>
249 <span class="mdc-list-item__ripple"></span>
250 <span class="mdc-list-item__text">{ "A Menu Item" }</span>
251 </li>
252 <li class="mdc-list-item" role="menuitem" onclick=link.callback(|_| Self::Message::Close)>
253 <span class="mdc-list-item__ripple"></span>
254 <span class="mdc-list-item__text">{ "Another Menu Item" }</span>
255 </li>
256 { self.props.children.clone() }
257 </ul>
258 </div>
259 }
260 }
261
262 fn rendered(&mut self, first_render: bool) {
263 // if first_render {

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected