From 403cf803400a1139d9c4e4f1078bcfe46ca9bf61 Mon Sep 17 00:00:00 2001 From: luoxiao Date: Sat, 7 Oct 2023 22:13:47 +0800 Subject: [PATCH] fix: select background color --- src/select/mod.rs | 9 +++++++-- src/select/select.css | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/select/mod.rs b/src/select/mod.rs index d645f03..6da56d7 100644 --- a/src/select/mod.rs +++ b/src/select/mod.rs @@ -1,4 +1,9 @@ -use crate::{teleport::Teleport, theme::use_theme, utils::mount_style::mount_style, Theme}; +use crate::{ + teleport::Teleport, + theme::use_theme, + utils::{maybe_rw_signal::MaybeRwSignal, mount_style::mount_style}, + Theme, +}; use leptos::*; use std::hash::Hash; use wasm_bindgen::__rt::IntoJsResult; @@ -11,7 +16,7 @@ pub struct SelectOption { #[component] pub fn Select( - #[prop(into)] value: RwSignal>, + #[prop(optional, into)] value: MaybeRwSignal>, #[prop(optional, into)] options: MaybeSignal>>, ) -> impl IntoView where diff --git a/src/select/select.css b/src/select/select.css index 85c668b..b2def12 100644 --- a/src/select/select.css +++ b/src/select/select.css @@ -17,6 +17,7 @@ } .melt-select-menu { + background-color: #fff; box-sizing: border-box; padding: 5px; position: absolute;