Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

v0.9.0

Compare
Choose a tag to compare
@Arenukvern Arenukvern released this 12 Mar 22:42
· 96 commits to next since this release

0.9.0

feat: ReordableListView based on awesome vue-draggable-next

First add ReordableListViewDelegate with items

const reordableDelegate = ReordableListViewDelegate.use({
  gridViewItems: [],
});
onMounted(() => {
  for (const el of layoutMatrix.value) {
    reordableDelegate.addUpdate(
      GridViewItem({
        child: TextButton({
          child: Text({
            text: ref(`text key  ljsdl f:${el.index}`),
          }),
          expand: true,
          onTap: () => alert(`Hola ${el.index}!`),
        }),
        position: el,
      })
    );
  }
});

Then use it in tree

ReordableListView({
  delegate: reordableDelegate,
  isDraggable,
  onReorder: ({ newIndex, position }) => {
    console.log({ newIndex, position });
    const newPosition = position;
    newPosition.position.y = newIndex;
    const i = layoutMatrix.value.findIndex(
      (el) => el.index == newPosition?.position.index
    );
    if (i && newIndex != null) {
      if (newPosition) {
        layoutMatrix.value.splice(i, 1, newPosition.position);
        return;
      }
    }
    layoutMatrix.value.splice(i, 1);
  },
});

feat: temporary in some components where added _debugClasses to test Tailwind css. All these properties will be removed later.

made width coauthoring Michael Melnikov