fix: delete in structure
This commit is contained in:
@@ -69,6 +69,12 @@ const getScrollY = () => (typeof window !== "undefined" ? window.scrollY : 0);
|
||||
|
||||
const randomSuffix = () => Math.random().toString(36).slice(2, 8);
|
||||
|
||||
const stopPointerEventPropagation = (event) => {
|
||||
event?.stopPropagation?.();
|
||||
event?.preventDefault?.();
|
||||
event?.nativeEvent?.stopImmediatePropagation?.();
|
||||
};
|
||||
|
||||
const createSortableItem = (type, occurrence = 1) => ({
|
||||
id: `${type}-${occurrence}-${randomSuffix()}`,
|
||||
type,
|
||||
@@ -691,9 +697,10 @@ const CustomizeSongStructure = ({ baseStructure = [], onChange }) => {
|
||||
<View style={styles.rowActions}>
|
||||
{canRemove && (
|
||||
<TouchableOpacity
|
||||
onPressIn={(ev) => ev?.stopPropagation?.()}
|
||||
onPointerDown={stopPointerEventPropagation}
|
||||
onPressIn={stopPointerEventPropagation}
|
||||
onPress={(ev) => {
|
||||
ev?.stopPropagation?.();
|
||||
stopPointerEventPropagation(ev);
|
||||
handleRemoveItem(item.id);
|
||||
}}
|
||||
style={styles.removeButton}
|
||||
|
||||
Reference in New Issue
Block a user