-
Notifications
You must be signed in to change notification settings - Fork 16
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: Enhance SelectInput and DAOSelector #669
Conversation
✅ Deploy Preview for teritori-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for testitori ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
3a8bfae
to
3bd6191
Compare
2bf7627
to
9e2a1b0
Compare
9e2a1b0
to
255dfac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did not read everything yet
export const useNSPrimaryAliases = (userIds: string[] | undefined) => { | ||
const { data, ...other } = useQuery( | ||
nsPrimaryAliasQueryKey(userIds?.map((id) => id.slice(-3)).toString()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this breaks caching, please use useNSPrimaryAlias
deeper in the component tree
inputIconContainer: { | ||
marginLeft: layout.padding_x1_5, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't use stylesheet.Create
or add new fields in stylesheet.Create
, this creates potential undetectable deadcode and has no performance impact contrary to popular belief
if you want to define constant styles to prevent re-renders on memoized components, use something like
export const SomeComponent: React.FC = () => {
return <View style={inputIconContainerStyle} />
}
const inputIconContainerStyle: ViewStyle = {
marginLeft: layout.padding_x1_5,
}
@@ -71,7 +71,6 @@ export const TNSManageScreen: React.FC<TNSManageScreenProps> = ({ | |||
</BrandText> | |||
|
|||
<DAOSelector | |||
value={selectedDAOId} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure about this change? uncontrolled inputs can be a pain
DAOSelector
.SelectInput
and add the possibility to enters a value to search in theSelectInput
list (Not effective forDAOSelector
, the image is just an example)Before, we used
@react-native-picker/picker
See
teritori-dapp/packages/components/dao/DAOSelector.tsx
Line 18 in 99619c9
And
teritori-dapp/packages/components/inputs/SelectInput.tsx
Line 52 in 99619c9