Skip to main content

Version 5.x breaking changes

Version 5.0.0 introduces significant breaking changes that require code modifications. Review all changes carefully before upgrading.

Select component API changes

Impact: High - All Select component implementations require updates

Value and onChange signature changes

The Select component now works with Option<T> objects instead of raw values. Before (4.7.x):
value: T
onChange?: (value: T) => void
After (5.x):
value: Option<T> | Option<T>[] | null
onChange?: (value: Option<T> | Option<T>[] | null) => void
Migration:
  • Update all value props to pass the full option object
  • Update onChange handlers to receive and handle option objects
  • Extract the value property when needed: option.value

Children render prop requirement

The Select component now requires a children render prop for option rendering. Before (4.7.x):
<FlxSelect
  options={options}
  value={value}
  onChange={setValue}
/>
After (5.x):
<FlxSelect
  options={options}
  value={value}
  onChange={setValue}
>
  {(option, onClick, isSelected) => (
    <SelectOption option={option} onClick={onClick} isSelected={isSelected} />
  )}
</FlxSelect>
Migration:
  • Add a children render prop to all Select components
  • Use the provided SelectOption component or create custom option rendering

Error prop type change

The error prop changed from FieldError to boolean. Before (4.7.x):
error?: FieldError
After (5.x):
error?: boolean
Migration:
  • Convert FieldError objects to boolean: error={!!fieldState.error}
  • Update type definitions if using TypeScript

New FlxSelectContainer component

Select components must now be wrapped in FlxSelectContainer. Before (4.7.x):
<FlxSelect options={options} value={value} onChange={setValue} />
After (5.x):
<FlxSelectContainer dataUniqueid="my-select" dataTestId="my-select">
  <FlxSelect options={options} value={value} onChange={setValue}>
    {(option, onClick, isSelected) => (
      <SelectOption option={option} onClick={onClick} isSelected={isSelected} />
    )}
  </FlxSelect>
</FlxSelectContainer>
Migration:
  • Wrap all Select components with FlxSelectContainer
  • Move dataUniqueid and dataTestId props to the container

New listClassName prop

Added listClassName prop for styling the options list separately. After (5.x):
<FlxSelect
  optionClassName="option-style"
  listClassName="list-style"
  // ...
/>
Migration:
  • Review your styling to determine if you need separate list styling
  • Move dropdown list styles to listClassName if needed

Option interface changes

The Option interface now includes an optional enabled property. Before (4.7.x):
interface Option<T> {
  value: T;
  label: string;
}
After (5.x):
interface Option<T> {
  value: T;
  label: string;
  enabled?: boolean;
}
Migration:
  • Add enabled: false to options you want to disable
  • Update option creation logic to include this property

Multi-select enhancements

Impact: Medium - Multi-select implementations gain new capabilities

New multi-select specific props

Version 5.x adds comprehensive multi-select support with new props:
multiselect?: boolean
multiSelectSearch?: (props: MultiSelectSearchProps) => ReactElement | null
multiSelectSelections?: (props: MultiSelectSelectionsProps) => ReactElement | null
maxSelectable?: number
optionsDisplayMode?: MultiSelectOptionsDisplayModeType
Migration:
  • Set multiselect={true} for multi-select behavior
  • Provide custom search and selection components if needed
  • Set maxSelectable to limit selections
  • Choose an optionsDisplayMode (defaults to COMMA_SEPARATED)

Multi-select value type

Multi-select now returns an array of options. After (5.x):
const [values, setValues] = useState<Option<string>[]>([]);

<FlxSelect
  value={values}
  onChange={(newValues) => setValues(newValues as Option<string>[])}
  multiselect={true}
/>
Migration:
  • Update state to handle arrays of options for multi-select
  • Add type guards or type assertions as needed

Form control component removals

Impact: High - Form implementations using these components require refactoring

Removed components

The following form control components were removed in v5.x:
  • FlxFormField - Use Controller from react-hook-form instead
  • FlxFormItem - Use native HTML structure instead
  • FlxFormControl - Use native HTML structure instead
  • FlxFormContent - Use native HTML structure instead
Before (4.7.x):
import { FlxFormField, FlxFormItem, FlxFormControl } from '@flowx/react-ui-toolkit';

<FlxFormField
  control={control}
  name="field"
  render={({ field }) => (
    <FlxFormItem>
      <FlxFormControl>
        <Input {...field} />
      </FlxFormControl>
    </FlxFormItem>
  )}
/>
After (5.x):
import { Controller } from 'react-hook-form';

<Controller
  control={control}
  name="field"
  render={({ field }) => (
    <div className="form-field">
      <Input {...field} />
    </div>
  )}
/>
Migration:
  • Replace FlxFormField with Controller from react-hook-form
  • Replace wrapper components with standard HTML elements
  • Apply your own styling using CSS classes

Removed hooks

  • useFormField - Use useFormContext or useController from react-hook-form instead
Before (4.7.x):
import { useFormField } from '@flowx/react-ui-toolkit';

const { error, invalid } = useFormField();
After (5.x):
import { useFormContext } from 'react-hook-form';

const { formState } = useFormContext();
const error = formState.errors[fieldName];
Migration:
  • Replace with react-hook-form hooks directly
  • Access form state through the form context

Icon system changes

Impact: Medium - Icon implementations require import updates

Icon dictionary removal

The IconDictionary export has been removed in favor of direct string names. Before (4.7.x):
import { Icon } from '@flowx/react-ui-toolkit';
import { IconDictionary } from '@flowx/react-ui-toolkit';

<Icon name={IconDictionary.CHECK} />
<Icon name={IconDictionary.CLOSE} />
After (5.x):
import { Icon } from '@flowx/react-ui-toolkit';

<Icon name="check" />
<Icon name="close" />
Migration:
  • Replace all IconDictionary references with string literals
  • Convert dictionary constant names to lowercase kebab-case
  • Update TypeScript types if you have custom icon type definitions

Icon set structure change

The internal icon set structure has changed. Before (4.7.x):
lib/icon/Icon.dictionary.d.ts
After (5.x):
lib/icon/icon_set/index.d.ts
Migration:
  • Update any direct imports of icon definitions
  • Use the public Icon component API instead of internal icon sets

Dependency changes

Impact: Medium - Package installation and peer dependencies affected

Removed peer dependencies

These are now bundled with the toolkit:
  • air-datepicker - Now a direct dependency
  • ag-grid-react - Now a direct dependency
Before (4.7.x):
"peerDependencies": {
  "react": "~18",
  "react-dom": "~18",
  "air-datepicker": "~3",
  "ag-grid-react": "~32"
}
After (5.x):
"peerDependencies": {
  "react": "~18",
  "react-dom": "~18"
}
Migration:
  • Remove air-datepicker and ag-grid-react from your package.json if only used by UI Toolkit
  • Keep them if your application uses them directly

Removed internal dependencies

These dependencies are no longer used:
  • react-hook-form - No longer a direct dependency (still supported as peer dependency)
  • react-use-measure
  • react-remove-scroll
  • @react-spring/web
  • @radix-ui/react-use-controllable-state
  • @radix-ui/react-slot
  • @radix-ui/react-use-previous
Migration:
  • Add react-hook-form to your dependencies if you use form controls
  • Remove unused dependencies from your project

New dependencies

  • @base-ui-components/react@1.0.0-beta.6 - New accessibility primitive library
  • marked@12.0.2 - Bundled dependency
  • marked-mangle@1.1.10 - Bundled dependency
  • tabbable@6.2.0 - Bundled dependency
Migration:
  • No action required - these are bundled with the toolkit
  • If you use @radix-ui primitives directly, continue including them in your dependencies

Component exports structure

Impact: Low - New component exports available

New exports

Chip component (5.x):
export * from './lib/chip/Chip';
Migration:
  • Import and use the new Chip component for tags and selections

Multi-select specific exports

New in 5.x:
import { 
  MultiSelectOption,
  MultiSelectSearch,
  MultiSelectSelections 
} from '@flowx/react-ui-toolkit';
Migration:
  • Use these components for customizing multi-select behavior

TypeScript type changes

Impact: Medium - Type errors may occur if using TypeScript

Generic type constraints

The Select component now has stricter generic type constraints. Before (4.7.x):
FlxSelectProps<unknown>
After (5.x):
FlxSelectProps<T>
Migration:
  • Provide explicit type parameters: FlxSelectProps<string>
  • Update component usage with proper generic types

Component prop types

Several component prop interfaces have changed from ComponentPropsWithoutRef to include additional specific props. Migration:
  • Update custom component wrappers with new prop types
  • Use TypeScript’s IntelliSense to discover new props

Version 5.1.x changes

No breaking changes. These versions include:
  • Bug fixes and performance improvements
  • Enhanced multi-select stability
  • TypeScript type refinements
  • Accessibility improvements
Internal version progression:
  • 5.1.0: v9.153.6
  • 5.1.1: v9.159.5
  • 5.1.2: v9.161.3
  • 5.1.3: v9.163.0
  • 5.1.4: v9.163.6
  • 5.1.5: v9.163.12

Version 5.2.x changes

No breaking changes. This version includes:
  • Performance optimizations for large datasets
  • Enhanced table component performance
  • Improved date picker localization
  • Internal version: v10.12.1

Version 5.3.x changes

No breaking changes. This version includes:
  • Chip component styling enhancements
  • Modal accessibility improvements
  • File upload component refinements
  • Internal version: v10.32.4

Version 5.4.x changes

No breaking changes. This version includes:
  • Multi-select performance improvements
  • Enhanced keyboard navigation
  • Toast notification improvements
  • Internal version: v10.59.1

Version 5.5.x changes

No breaking changes. This version includes:
  • Latest stability improvements
  • Enhanced accessibility features
  • Performance optimizations
  • Bug fixes
  • Internal version: v10.91.0
Recommended version for all new projects.

Version 4.7.x maintenance changes

Version 4.7.x receives only critical security fixes and bug patches. No new features are added.
No breaking changes between 4.7.x releases. These versions are fully compatible:
  • 4.7.0: v5.80.6 - Initial 4.7 release
  • 4.7.1: v5.83.8 - Bug fixes
  • 4.7.2: v5.84.5 - Security patches
  • 4.7.3: v5.91.2 - Performance improvements
  • 4.7.4: v5.93.1 - Bug fixes
  • 4.7.5: v5.95.1 - Security updates
  • 4.7.6: v5.96.1 - Bug fixes
  • 4.7.7: v5.97.1 - Performance patches
  • 4.7.8: v5.98.0 - Bug fixes
  • 4.7.9: v5.101.1 - Security patches
  • 4.7.10: v5.103.5 - Bug fixes
  • 4.7.11: v5.103.6 - Latest stable 4.x release
All 4.7.x versions are backwards compatible and can be upgraded without code changes.

Impact assessment summary

Critical (requires immediate attention)

  • Select component value and onChange signature changes
  • Select component children render prop requirement
  • Form control component removals (FlxFormField, FlxFormItem, etc.)

High (requires code modifications)

  • Error prop type change from FieldError to boolean
  • FlxSelectContainer wrapper requirement
  • useFormField hook removal

Medium (may require changes)

  • Icon dictionary to string name conversion
  • Multi-select API additions
  • Dependency management updates
  • TypeScript type refinements

Low (informational)

  • New Chip component availability
  • Internal dependency changes
  • Component export structure changes

Migration timeline recommendation

1

Week 1: Planning and assessment

Audit your codebase for component usage and identify affected areas.
2

Week 2-3: Development

Implement changes starting with critical components (Select, Forms).
3

Week 4: Testing

Comprehensive testing of all migrated components.
4

Week 5: Production deployment

Deploy to production with monitoring and rollback plan.

Additional resources

Migration guide

Step-by-step migration instructions with code examples

Migration overview

Version strategy and compatibility information

Build docs developers (and LLMs) love