forked from jsnbuchanan/crowd-funder-for-time-pwa
refactor: convert GiftDetailsStep update handlers from emits to function props
- Replace @Emit("update:description"), @Emit("update:amount"), @Emit("update:unitCode") with function props
- Add onUpdateDescription, onUpdateAmount, onUpdateUnitCode function props with TypeScript typing
- Update GiftedDialog to use new function prop interface for update handlers
- Remove emit decorators and methods for update events
- Keep emit pattern for non-update events (edit-entity, explain-data, submit, cancel)
- Improve component documentation to reflect new architecture
This change provides better parent control over validation and update behavior
for form fields while maintaining existing functionality for other events.
This commit is contained in:
@@ -39,9 +39,9 @@
|
||||
:offer-id="offerId"
|
||||
:from-project-id="fromProjectId"
|
||||
:to-project-id="toProjectId"
|
||||
@update:description="description = $event"
|
||||
@update:amount="handleAmountUpdate"
|
||||
@update:unit-code="unitCode = $event"
|
||||
:on-update-description="(desc: string) => (description = desc)"
|
||||
:on-update-amount="handleAmountUpdate"
|
||||
:on-update-unit-code="(code: string) => (unitCode = code)"
|
||||
@edit-entity="handleEditEntity"
|
||||
@explain-data="explainData"
|
||||
@submit="handleSubmit"
|
||||
|
||||
Reference in New Issue
Block a user