You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/07/20 16:12:02 UTC

[GitHub] [superset] michael-s-molina commented on a change in pull request #15799: chore: Adds lazy loading and fetchOnlyOnSearch to the Select component

michael-s-molina commented on a change in pull request #15799:
URL: https://github.com/apache/superset/pull/15799#discussion_r673266244



##########
File path: superset-frontend/src/components/Select/Select.tsx
##########
@@ -137,15 +143,16 @@ const Error = ({ error }: { error: string }) => (
 const Select = ({
   allowNewOptions = false,
   ariaLabel,
+  fetchOnlyOnSearch,

Review comment:
       > What do you think of changing this prop to `fetchOnFocus`? I think it is more accurate as you are not typing anything but only focusing the input.
   >
   > Also, I remember agreeing that we should just set this as the standard as it might be dangerous for performance otheriwse. What do you think?
   
   I think you misunderstood the code. By default, the queries will only be triggered when the select is opened for the first time. This is controlled by the `loadingEnabled` state. 
   
   The `fetchOnlyOnSearch` property is another behavior where the queries will only be triggered when there's a search input present.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org