!LtIECwsjkkjinzHTTB:matrix.org

Support/Help

945 Members
8 Servers

Load older messages


SenderMessageTime
12 Jan 2024
@_discord_326088262118670337:t2bot.iokirillsemyonkin i didnt understand really kek
if you are still talking about overflow:hidden, i would do it from ModalProvider/ModalHandle
21:39:44
@_discord_1191787143169851574:t2bot.iodementeddddd how do i set that on body from there tho 21:40:14
@_discord_1191787143169851574:t2bot.iodementeddddd it would be perfect to do it from the show and hide functions 21:41:51
@_discord_326088262118670337:t2bot.iokirillsemyonkin for the second solution, inside ModalProvider, you just add a
let css = css! {
    body {
        overflow: ${if *visible { "hidden" } else { "initial" }};
    }
};

<Global { css } />


for the first solution, inside show/hide, you would do something like
use gloo_utils::body;

body().style().set_property("overflow", ...).unwrap();
21:44:22
@_discord_326088262118670337:t2bot.iokirillsemyonkin * for the second solution, inside ModalProvider, you just add a
let css = css! {
    body {
        overflow: ${if *visible { "hidden" } else { "initial" }};
    }
};

... // anywhere inside html!
<Global { css } />
...


for the first solution, inside show/hide, you would do something like
use gloo_utils::body;

body().style().set_property("overflow", ...).unwrap();
21:44:59
@_discord_1191787143169851574:t2bot.iodementeddddd oh yea i can just place css anywhere 21:46:59
@_discord_1191787143169851574:t2bot.iodementeddddd imma go with the 2nd one 21:48:07
@_discord_326088262118670337:t2bot.iokirillsemyonkin for 2nd one you might need web_sys also 21:48:12
@_discord_326088262118670337:t2bot.iokirillsemyonkin with some features turned on 21:48:21
@_discord_326088262118670337:t2bot.iokirillsemyonkin for first one the feature is "yew" i think 21:48:29
@_discord_326088262118670337:t2bot.iokirillsemyonkinRedacted or Malformed Event21:48:33
@_discord_326088262118670337:t2bot.iokirillsemyonkinRedacted or Malformed Event21:48:35
@_discord_326088262118670337:t2bot.iokirillsemyonkinRedacted or Malformed Event21:48:38
@_discord_326088262118670337:t2bot.iokirillsemyonkinRedacted or Malformed Event21:48:39
@_discord_326088262118670337:t2bot.iokirillsemyonkin * for body().style() one you might need web_sys also 21:48:58
@_discord_1191787143169851574:t2bot.iodementeddddd yes it worked 21:54:20
@_discord_1191787143169851574:t2bot.iodementeddddd cant scroll now 21:54:25
@_discord_1191787143169851574:t2bot.iodementeddddd do i add an on_click to the .modal now for exiting 21:55:16
@_discord_1191787143169851574:t2bot.iodementeddddd and a key press maybe 21:55:22
@_discord_1191787143169851574:t2bot.iodementeddddd however that works 21:55:27
@_discord_326088262118670337:t2bot.iokirillsemyonkin for global key events i wrote about it https://discord.com/channels/701068342760570933/1164567450692628610/1164655541671440434 22:01:21
@_discord_326088262118670337:t2bot.iokirillsemyonkin however there might be more checks needed, for example no input probably should be in focus 22:01:45
@_discord_326088262118670337:t2bot.iokirillsemyonkin click outside to close i showed here 22:04:59
@_discord_1191787143169851574:t2bot.iodementeddddd alr thanks ill look more into t hat stuff tmrw, thanks for the help :) 22:05:39
@_discord_178890871318642688:t2bot.ioinnominus changed their display name from innominus#0 to innominus.22:22:56
19 Jan 2024
@asbjorn:olli.ngA2 joined the room.14:28:34
24 Jan 2024
@tobin6579:matrix.orgtobin6579 joined the room.06:46:03
31 Jan 2024
@asbjorn:olli.ngA2

Is there any way to make a whole component be async?
I'm doing the spawn_local thing all over the place right now, and it's becoming a bit inconvenient.

My dream would be able to something like

#[async_function_component(MyPage)]
async fn my_page(props: &Props) {
  ...
}

but it looks like that's not something supported by yew

13:49:07
@aziz6004:matrix.org@aziz6004:matrix.org joined the room.22:20:38
@aziz6004:matrix.org@aziz6004:matrix.orgRedacted or Malformed Event22:20:40

Show newer messages


Back to Room ListRoom Version: 6