Releases: AdamLee321/react-native-sortable-dynamic
Releases · AdamLee321/react-native-sortable-dynamic
v0.2.2-release
*** New Features
-
scrollContainerStyle prop: Allows custom styling for the container that wraps the scrollable content.
-
scrollContentContainerStyle prop: Enables custom styling for the content inside the scrollable container.
These new props provide more flexibility and control over the appearance of scrollable components, allowing developers to easily apply custom styles to both the outer container and the scrollable content.
Full Changelog: v0.2.1-release...v0.2.2-release
v0.2.1 release
🛠 Fixes
- Resolved nativeID error: Fixed an issue that caused a nativeID error when rendering sortable items in certain views. This improves the stability and compatibility of the component across various React Native versions.
Full Changelog: v0.2.0-release...v0.2.1-release
v0.2.0 release
New Features:
- Custom Item Styles and Props: Introduced itemStyle and itemProps to allow more flexibility in customizing the appearance and behavior of each sortable item.
- Enhanced Customizability: You can now easily pass additional styles and props to the items in the grid or list, improving the overall control over how items are rendered and interact.
Improvements:
- Code Refactoring: Improved internal structure and naming of components for better clarity and maintainability.
- Better Handling of Props: Updated components to ensure consistent application of props throughout the sortable items.
Usage
<SortableView
config={{ MARGIN: 10, COL: 2 }}
data={data}
editing={enableEditing}
onDragEnd={positions => console.log(positions)}
renderItem={renderItem}
onPress={handleLongPress}
onLongPress={handleLongPress}
itemStyle={{ backgroundColor: 'blue' }}
itemProps={{ disabled: true }}
/>
Full Changelog: v0.1.1-release...v0.2.0-release
v0.1.1 release
v0.1.1 - Bug Fix
- 🐛 Fix: Corrected the
MARGIN
calculation inItem.js
to ensure proper spacing between items in the sortable grid layout.
v0.1.0 release
What's New in v0.1.0
- 🚀 Initial Release: First stable release of
react-native-sortable-dynamic
. - 🖱️ Drag-and-Drop Support: Easily reorder grid and list items using intuitive gestures.
- 🧩 Flexible Grid Layout: Customize columns, margins, and item sizes to fit your layout needs.
- 🛠️ Editable Mode: Toggle between editing and non-editing modes to enable/disable item reordering.
- ⚡ Smooth Animations: Integrated with
react-native-reanimated
for seamless and performant animations. - 🔐 Lock Items: Mark items as non-reorderable or non-draggable to protect specific content.
- 🧩 Dynamic Layout Configuration: Easily switch between grid and list views by configuring layout dynamically.
Installation
npm install react-native-sortable-dynamic
# or
yarn add react-native-sortable-dynamic
Make sure to also install react-native-reanimated and react-native-gesture-handler as dependencies and follow their setup instructions.