Container::from_tag("hr")
.key(key)
.class("pwt-w-100")
- .margin_y(2),
+ .margin_y(2)
+ .into(),
);
}
/// Adds custom child in the first column
pub fn add_custom_child(&mut self, child: impl Into<Html>) {
- self.add_custom_child_impl(FieldPosition::Left, false, child);
+ self.add_custom_child_impl(FieldPosition::Left, false, child.into());
}
/// Builder style method to add a custom child in the second column
/// Adds custom child in the second column
pub fn add_right_custom_child(&mut self, child: impl Into<Html>) {
- self.add_custom_child_impl(FieldPosition::Right, false, child);
+ self.add_custom_child_impl(FieldPosition::Right, false, child.into());
}
/// Builder style method to add a large custom child
/// Adds large custom child
pub fn add_large_custom_child(&mut self, child: impl Into<Html>) {
- self.add_custom_child_impl(FieldPosition::Large, false, child);
+ self.add_custom_child_impl(FieldPosition::Large, false, child.into());
}
- fn add_custom_child_impl(
- &mut self,
- column: FieldPosition,
- advanced: bool,
- child: impl Into<Html>,
- ) {
+ fn add_custom_child_impl(&mut self, column: FieldPosition, advanced: bool, child: Html) {
let (row, start, span) = match column {
FieldPosition::Left => {
self.left_count += 1;
};
let class = classes!("pwt-align-self-center");
- let child = child.into();
let key = match child.key() {
Some(key) => key.clone(),
None => {