zephyring commented on code in PR #21549:
URL: https://github.com/apache/superset/pull/21549#discussion_r977804840
##########
superset-frontend/src/dashboard/components/PropertiesModal/index.tsx:
##########
@@ -123,23 +123,35 @@ const PropertiesModal = ({
};
const loadAccessOptions = useCallback(
- (accessType = 'owners', input = '', page: number, pageSize: number) => {
+ (
+ accessType = 'owners',
+ input = '',
+ checkActive: boolean = true,
+ page: number,
+ pageSize: number,
+ ) => {
const query = rison.encode({
filter: input,
page,
page_size: pageSize,
});
return SupersetClient.get({
endpoint: `/api/v1/dashboard/related/${accessType}?q=${query}`,
- }).then(response => ({
- data: response.json.result
- .filter((item: { extra: { active: boolean } }) => item.extra.active)
Review Comment:
maybe we can check if item.extra.active attribute is there and if yes then
leverage that otherwise not
so that we don't need to introduce the extra `checkActive` param
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]