Skip to content

Commit c472348

Browse files
committed
fix: selection component
- kobalte update broke previous selection component
1 parent bda21bf commit c472348

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

GUI/ETVR/src/components/Selection/index.tsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Select } from '@kobalte/core'
22
import { FaSolidCheck } from 'solid-icons/fa'
3-
import { HiSolidSelector } from 'solid-icons/hi'
3+
import { TbSelector } from 'solid-icons/tb'
44
import { type Component, createSignal } from 'solid-js'
55
import './styles.css'
66

@@ -25,11 +25,10 @@ const Selection: Component<SelectionProps> = (props) => {
2525
<Select.Root
2626
name={props.name}
2727
value={value()}
28-
onValueChange={handleChange}
28+
onChange={handleChange}
2929
defaultValue={props.defaultValue}
3030
options={props.options}
3131
placeholder={props.placeholder}
32-
valueComponent={(props) => props.item.rawValue}
3332
itemComponent={(props) => (
3433
<Select.Item item={props.item} class="select__item">
3534
<Select.ItemLabel>{props.item.rawValue}</Select.ItemLabel>
@@ -39,9 +38,11 @@ const Selection: Component<SelectionProps> = (props) => {
3938
</Select.Item>
4039
)}>
4140
<Select.Trigger class="select__trigger" aria-label="ESP_Boards">
42-
<Select.Value class="select__value" />
41+
<Select.Value class="select__value">
42+
{(state) => state.selectedOption() as Element}
43+
</Select.Value>
4344
<Select.Icon class="select__icon">
44-
<HiSolidSelector />
45+
<TbSelector />
4546
</Select.Icon>
4647
</Select.Trigger>
4748
<Select.Description>{props.description}</Select.Description>

GUI/ETVR/src/store/context/ui/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interface AppUIContext {
2222

2323
const AppUIContext = createContext<AppUIContext>()
2424
export const AppUIProvider: Component<Context> = (props) => {
25-
const defaultState = {
25+
const defaultState: UiStore = {
2626
loader: { [loaderType.MDNS_CONNECTING]: false, [loaderType.REST_CLIENT]: false },
2727
connecting: false,
2828
openModal: false,

0 commit comments

Comments
 (0)