cccs-RyanK commented on code in PR #22084: URL: https://github.com/apache/superset/pull/22084#discussion_r1053359469
########## superset-frontend/src/components/Select/Select.tsx: ########## @@ -260,10 +294,110 @@ const Select = forwardRef( } }, [isLoading, loading]); + const selectAllMode = useMemo( + () => ensureIsArray(selectValue).length === fullSelectOptions.length + 1, + [selectValue, fullSelectOptions], + ); + useEffect(() => { - setSelectValue(value); + // if all values are selected, add select all to value + if ( Review Comment: added isSingleMode and labelInValue as dependencies, but i purposefully left out fullSelectOptions.length because this hook should only be called when the component props have been changed. fullSelectOptions can change when new options are added and in that case we don't want the select value to be reset (erasing the newly added options). -- 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-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org