Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use UIDatePickerStyle value for dimension measurements #1

Conversation

vonovak
Copy link

@vonovak vonovak commented Sep 15, 2022

this should fix some more width issues

before

Simulator Screen Shot - iPhone 13 Pro - 2022-09-15 at 23 03 37

after

Simulator Screen Shot - iPhone 13 Pro - 2022-09-15 at 22 57 36

@@ -80,18 +78,6 @@ export default function Picker({
[onChange, value],
);

React.useEffect(
function ensureCorrectHeight() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the old architecture, we definitely don't need this, good catch 👍

However, I have not tested my PR with the New Architecture PR. I think the shadow view implementation I've done is only for the old architecture given the rendering on the New Architecture is done in C++. But I am not 100 % sure. @alfonsocj, would you be able to check if this library still works on the New Architecture if you'd merge the changes from here?

@@ -100,33 +100,10 @@ + (NSString*) datepickerStyleToString: (UIDatePickerStyle) style API_AVAILABLE(
}
}

RCT_EXPORT_METHOD(getDefaultDisplayValue:(NSDictionary *)options resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perfect 👌 I have not realized we can remove this logic.

@fortmarek
Copy link
Owner

I'm gonna merge this and we can continue the discussion in the original PR.

@fortmarek fortmarek merged commit d312edb into fortmarek:ios/date-picker-width Sep 16, 2022
@vonovak vonovak deleted the fix/style branch September 30, 2022 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants