mirror of
https://github.com/whekin/household-bot.git
synced 2026-04-01 02:54:04 +00:00
fix: purchase split rebalancing and input focus issues
- Add onBlur handler to Input component for rebalancing on blur - Rewrite rebalancePurchaseSplit to calculate delta vs total and distribute - Extract ParticipantSplitInputs component with proper SolidJS reactivity - Button shows 'Balance' when validation fails, 'Save' when valid - Add i18n keys for purchaseBalanceAction and purchaseRebalanceAction
This commit is contained in:
@@ -18,6 +18,7 @@ type InputProps = {
|
||||
id?: string
|
||||
onInput?: JSX.EventHandlerUnion<HTMLInputElement, InputEvent>
|
||||
onChange?: JSX.EventHandlerUnion<HTMLInputElement, Event>
|
||||
onBlur?: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>
|
||||
}
|
||||
|
||||
export function Input(props: InputProps) {
|
||||
@@ -38,6 +39,7 @@ export function Input(props: InputProps) {
|
||||
class={cn('ui-input', props.class)}
|
||||
onInput={props.onInput}
|
||||
onChange={props.onChange}
|
||||
onBlur={props.onBlur}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user