McBrincie212
McBrincie212
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
i didn't know the bug to this extent
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
that was some test code
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
im just an idiot
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
nvm
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
one problem tho im noticing is the styles just don't apply
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
so ur eyes can burn a bit more
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
tieActiveDisabledFieldToCSSVariable: (
inactiveField: keyof T, activeField: keyof T,
element: HTMLElement, cssVar: string
) => {
// Completely cursed code
const currentField: Accessor<string> = (
getterForReactiveColorField.bind(
stylesGetter(),
isDisabled,
isToggled
) as (inactiveColorField: keyof T, activeColorField: keyof T) => Accessor<string>
)(inactiveField, activeField);
createEffect(() => {
const value: string = currentField();
element.style.setProperty(`--${cssVar}`, value);
})
},
},
tieActiveDisabledFieldToCSSVariable: (
inactiveField: keyof T, activeField: keyof T,
element: HTMLElement, cssVar: string
) => {
// Completely cursed code
const currentField: Accessor<string> = (
getterForReactiveColorField.bind(
stylesGetter(),
isDisabled,
isToggled
) as (inactiveColorField: keyof T, activeColorField: keyof T) => Accessor<string>
)(inactiveField, activeField);
createEffect(() => {
const value: string = currentField();
element.style.setProperty(`--${cssVar}`, value);
})
},
},
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
here is some jargin code i wrote
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
without even realising it
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
i squashed the bug
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
by some miracle
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
the "christmas" animation doesn't work on the input text component
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
this is worse of a bug than i thought
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
i don't think it will be needed
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
tho wait
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
yeh regarding that. Do want to track it
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
oh sh_t
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
it was painful
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
thx
66 replies
SSolidJS
Created by McBrincie212 on 4/2/2025 in #support
Updating a signal depending on if an element is focused or not
it solved immediately the problem
66 replies