Skip to content

Commit

Permalink
Make lastActiveItemIndex public, so selection on hover can be impleme…
Browse files Browse the repository at this point in the history
…nted (#201)
  • Loading branch information
Walingar authored Oct 23, 2023
1 parent e478afd commit e19a094
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions foundation/api/foundation.api
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,15 @@ public final class org/jetbrains/jewel/foundation/lazy/SelectableLazyListState :
public final fun getFirstVisibleItemIndex ()I
public final fun getFirstVisibleItemScrollOffset ()I
public final fun getInteractionSource ()Landroidx/compose/foundation/interaction/InteractionSource;
public final fun getLastActiveItemIndex ()Ljava/lang/Integer;
public final fun getLayoutInfo ()Landroidx/compose/foundation/lazy/LazyListLayoutInfo;
public final fun getLazyListState ()Landroidx/compose/foundation/lazy/LazyListState;
public fun getSelectedKeys ()Ljava/util/List;
public fun isScrollInProgress ()Z
public fun scroll (Landroidx/compose/foundation/MutatePriority;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun scrollToItem (IZILkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun scrollToItem$default (Lorg/jetbrains/jewel/foundation/lazy/SelectableLazyListState;IZILkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public final fun setLastActiveItemIndex (Ljava/lang/Integer;)V
public fun setSelectedKeys (Ljava/util/List;)V
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SelectableLazyListState(
internal var lastKeyEventUsedMouse: Boolean = false

override var selectedKeys by mutableStateOf(emptyList<Any>())
internal var lastActiveItemIndex: Int? = null
var lastActiveItemIndex: Int? = null

/**
*
Expand Down

0 comments on commit e19a094

Please sign in to comment.