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:
2026-03-13 10:40:42 +04:00
parent 588174fa52
commit 31dd1dc2ee
4 changed files with 303 additions and 190 deletions

View File

@@ -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}
/>
)
}