Basic Usage
El component SegmentsFilter permet gestionar múltiples segments de vol amb opcions d'afegir i eliminar segments. Cada segment utilitza el SegmentFilter internament.
Flight Segments
No flight segments added yet. Click 'Add Segment' to get started.
[]
With Default Segments
Exemple amb segments pre-existents i configuració personalitzada.
Multi-City Trip
1. Barcelona - Madrid
2. Madrid - London
Without Title
Versió compacta sense títol per integració en altres components.
No flight segments added yet. Click 'Add Segment' to get started.
API Reference
interface SegmentsFilterProps { segments?: SegmentEntry[]; maxSegments?: number; showTitle?: boolean; title?: string; addButtonText?: string; noSegmentsText?: string; dataTestId?: string; onGetOriginData?: (filter: string) => LegacyLocation[]; onGetDestinationData?: (filter: string) => LegacyLocation[]; onSegmentsChanged?: (segments: SegmentEntry[]) => void; onSegmentSelected?: (segment: SegmentEntry) => void; className?: string; } interface SegmentEntry { id: number; origin: LegacyLocation | null; destination: LegacyLocation | null; date: Date | null; time: Date | null; }