mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-01-23 17:09:21 -05:00
Clean up lints
This commit is contained in:
parent
c6914330b6
commit
b0a4fca795
5 changed files with 4 additions and 5 deletions
|
@ -93,7 +93,7 @@ impl<T: Clone> MaybeRwSignal<T> {
|
||||||
Self::DynamicRead(s) => {
|
Self::DynamicRead(s) => {
|
||||||
let (r, w) = signal(s.get_untracked());
|
let (r, w) = signal(s.get_untracked());
|
||||||
|
|
||||||
create_effect(move |_| {
|
Effect::new(move |_| {
|
||||||
w.update(move |w| {
|
w.update(move |w| {
|
||||||
*w = s.get();
|
*w = s.get();
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
use crate::core::{ElementMaybeSignal, ElementsMaybeSignal};
|
use crate::core::{ElementMaybeSignal, ElementsMaybeSignal};
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use default_struct_builder::DefaultBuilder;
|
use default_struct_builder::DefaultBuilder;
|
||||||
use leptos::prelude::diagnostics::SpecialNonReactiveZone;
|
|
||||||
|
|
||||||
cfg_if! { if #[cfg(not(feature = "ssr"))] {
|
cfg_if! { if #[cfg(not(feature = "ssr"))] {
|
||||||
use leptos::prelude::*;
|
use leptos::prelude::*;
|
||||||
|
@ -115,6 +114,7 @@ where
|
||||||
|
|
||||||
#[cfg(not(feature = "ssr"))]
|
#[cfg(not(feature = "ssr"))]
|
||||||
{
|
{
|
||||||
|
use leptos::prelude::diagnostics::SpecialNonReactiveZone;
|
||||||
let OnClickOutsideOptions {
|
let OnClickOutsideOptions {
|
||||||
ignore,
|
ignore,
|
||||||
capture,
|
capture,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
use crate::core::ElementMaybeSignal;
|
use crate::core::ElementMaybeSignal;
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use default_struct_builder::DefaultBuilder;
|
use default_struct_builder::DefaultBuilder;
|
||||||
use leptos::prelude::diagnostics::SpecialNonReactiveZone;
|
|
||||||
use leptos::prelude::wrappers::read::Signal;
|
use leptos::prelude::wrappers::read::Signal;
|
||||||
use leptos::prelude::*;
|
use leptos::prelude::*;
|
||||||
use std::fmt::{Debug, Formatter};
|
use std::fmt::{Debug, Formatter};
|
||||||
|
@ -78,6 +77,7 @@ where
|
||||||
|
|
||||||
#[cfg(not(feature = "ssr"))]
|
#[cfg(not(feature = "ssr"))]
|
||||||
{
|
{
|
||||||
|
use leptos::prelude::diagnostics::SpecialNonReactiveZone;
|
||||||
let UseDropZoneOptions {
|
let UseDropZoneOptions {
|
||||||
on_drop,
|
on_drop,
|
||||||
on_enter,
|
on_enter,
|
||||||
|
|
|
@ -91,7 +91,7 @@ pub fn use_media_query(query: impl Into<MaybeSignal<String>>) -> Signal<bool> {
|
||||||
listener.replace(Rc::new(move |_| update()) as Rc<dyn Fn(web_sys::Event)>);
|
listener.replace(Rc::new(move |_| update()) as Rc<dyn Fn(web_sys::Event)>);
|
||||||
}
|
}
|
||||||
|
|
||||||
create_effect(move |_| update());
|
Effect::new(move |_| update());
|
||||||
|
|
||||||
on_cleanup(cleanup);
|
on_cleanup(cleanup);
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use leptos::prelude::wrappers::read::Signal;
|
|
||||||
use leptos::prelude::*;
|
use leptos::prelude::*;
|
||||||
|
|
||||||
/// SSR compatibe `is_supported`
|
/// SSR compatibe `is_supported`
|
||||||
|
|
Loading…
Add table
Reference in a new issue