Function patternfly_yew::random_id

source ·
pub fn random_id() -> String
Examples found in repository?
src/switch.rs (line 46)
40
41
42
43
44
45
46
47
48
49
50
51
    fn create(ctx: &Context<Self>) -> Self {
        let id = ctx
            .props()
            .id
            .as_ref()
            .cloned()
            .unwrap_or_else(|| random_id());
        Self {
            id,
            input_ref: Default::default(),
        }
    }