fn sync_value(&mut self) {
        if self.props.readonly || self.props.variant.is_inline() {
            return;
        }

        let value = if !self.expanded {
            let ele: Option<HtmlInputElement> = self.text_ref.cast::<HtmlInputElement>();
            ele.map(|ele| ele.value()).unwrap_or_else(|| "".into())
        } else {
            let ele: Option<Element> = self.details_ref.cast::<Element>();
            ele.and_then(|ele| ele.text_content())
                .unwrap_or_else(|| "".into())
        };

        // log::info!("New value: {}", value);

        self.value = value;
    }
/// Sync the value between internal, text field or details.
Sync the value between internal, text field or details.
Sync the value between internal text field or details .
fn sync_value(&mut self) {
        if self.props.readonly || self.props.variant.is_inline() {
            return;
        }
        let value = if !self.expanded {
            let ele: Option<HtmlInputElement> = self.text_ref.cast::<HtmlInputElement>();
            ele.map(|ele| ele.value()).unwrap_or_else(|| "".into())
        } else {
            let ele: Option<Element> = self.details_ref.cast::<Element>();
            ele.and_then(|ele| ele.text_content())
                .unwrap_or_else(|| "".into())
        };
        // log::info!("New value: {}", value);
        self.value = value;
    }
fn sync_value ( & mut self ) { if self . props . readonly || self . props . variant . is_inline ( ) { return ; } let value = if ! self . expanded { let ele : Option < HtmlInputElement > = self . text_ref . cast :: < HtmlInputElement > ( ) ; ele . map ( | ele | ele . value ( ) ) . unwrap_or_else ( | | " " . into ( ) ) } else { let ele : Option < Element > = self . details_ref . cast :: < Element > ( ) ; ele . and_then ( | ele | ele . text_content ( ) ) . unwrap_or_else ( | | " " . into ( ) ) } ; // log::info!("New value: {}", value); self . value = value ; }
Sync the value between internal, text field or details.
Sync the value between internal text field or details .
&mut self
&mut self