Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
package com.reactnativecommunity.picker;

public record ReactPickerLocalData(int height) {
public class ReactPickerLocalData {
private final int height;

public ReactPickerLocalData(int height) {
this.height = height;
}

public int getHeight() {
return height;
}

@Override
public boolean equals(Object o) {
Expand All @@ -10,6 +19,11 @@ public boolean equals(Object o) {
return height == that.height;
}

@Override
public int hashCode() {
return 31 + height;
}

@Override
public String toString() {
return "RectPickerLocalData{" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ public class ReactPickerShadowNode extends LayoutShadowNode {
@Override
public void setLocalData(Object data) {
Assertions.assertCondition(data instanceof ReactPickerLocalData);
setStyleMinHeight(((ReactPickerLocalData) data).height());
setStyleMinHeight(((ReactPickerLocalData) data).getHeight());
}
}