mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 11:04:40 -05:00
fix: uses EXISTS to mark things that don't exist in the DOM
This commit is contained in:
@@ -90,6 +90,7 @@ impl<T: RenderHtml> RenderHtml for View<T> {
|
||||
type Owned = View<T::Owned>;
|
||||
|
||||
const MIN_LENGTH: usize = <T as RenderHtml>::MIN_LENGTH;
|
||||
const EXISTS: bool = <T as RenderHtml>::EXISTS;
|
||||
|
||||
async fn resolve(self) -> Self::AsyncOutput {
|
||||
self.inner.resolve().await
|
||||
|
||||
@@ -413,6 +413,7 @@ where
|
||||
type Owned = RegisteredMetaTag<E, At::CloneableOwned, Ch::Owned>;
|
||||
|
||||
const MIN_LENGTH: usize = 0;
|
||||
const EXISTS: bool = false;
|
||||
|
||||
fn dry_resolve(&mut self) {
|
||||
self.el.dry_resolve()
|
||||
|
||||
@@ -322,6 +322,7 @@ impl RenderHtml for TitleView {
|
||||
type Owned = Self;
|
||||
|
||||
const MIN_LENGTH: usize = 0;
|
||||
const EXISTS: bool = false;
|
||||
|
||||
fn dry_resolve(&mut self) {}
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ where
|
||||
type Owned = (A::Owned,);
|
||||
|
||||
const MIN_LENGTH: usize = A::MIN_LENGTH;
|
||||
const EXISTS: bool = A::EXISTS;
|
||||
|
||||
fn html_len(&self) -> usize {
|
||||
self.0.html_len()
|
||||
@@ -239,7 +240,6 @@ macro_rules! impl_view_for_tuples {
|
||||
{
|
||||
type State = ($first::State, $($ty::State,)*);
|
||||
|
||||
|
||||
fn build(self) -> Self::State {
|
||||
#[allow(non_snake_case)]
|
||||
let ($first, $($ty,)*) = self;
|
||||
@@ -267,7 +267,7 @@ macro_rules! impl_view_for_tuples {
|
||||
{
|
||||
type AsyncOutput = ($first::AsyncOutput, $($ty::AsyncOutput,)*);
|
||||
type Owned = ($first::Owned, $($ty::Owned,)*);
|
||||
|
||||
const EXISTS: bool = $first::EXISTS || $($ty::EXISTS || )* false;
|
||||
const MIN_LENGTH: usize = $first::MIN_LENGTH $(+ $ty::MIN_LENGTH)*;
|
||||
|
||||
#[inline(always)]
|
||||
|
||||
Reference in New Issue
Block a user