Skip to content

Commit

Permalink
fix(android): selection bug #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Onolememen committed Apr 5, 2020
1 parent af3188a commit dcb25bf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class BubbleSelectView(context: ReactContext): FrameLayout(context), LifecycleEv
inflate(context, R.layout.bubble_view, this)
bubblePicker = findViewById(R.id.bubble_picker);
bubblePicker.listener = this;
bubblePicker.maxSelectedCount = 10000
context.addLifecycleEventListener(this);
setupBubblePickerAdapter()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ class BubbleSelectViewManager: ViewGroupManager<BubbleSelectView>() {
return BubbleSelectView(reactContext)
}

@ReactProp(name = "allowsMultipleSelection")
fun setAllowsMultipleSelection(view: BubbleSelectView, allowsMultipleSelection: Boolean? = true) {
if (allowsMultipleSelection == null) return

if (allowsMultipleSelection) {
view.bubblePicker.maxSelectedCount = 10000
} else {
view.bubblePicker.maxSelectedCount = 1
}
}

@ReactProp(name = "maxSelectedItems")
fun setMaxSelectedItems(view: BubbleSelectView, max: Int?) {
if (max == null) return;
Expand Down

0 comments on commit dcb25bf

Please sign in to comment.