You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by as...@apache.org on 2026/08/27 20:45:36 UTC
(superset) branch alexandrusoare/feat/render-extra-fields-properties-modal created (now b17ccf58a75)
This is an automated email from the ASF dual-hosted git repository.
alexandrusoare pushed a change to branch alexandrusoare/feat/render-extra-fields-properties-modal
in repository https://gitbox.apache.org/repos/asf/superset.git
at b17ccf58a75 adding extra fields
This branch includes the following new commits:
new b17ccf58a75 adding extra fields
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: adding extra fields
Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alexandrusoare pushed a commit to branch alexandrusoare/feat/render-extra-fields-properties-modal
in repository https://gitbox.apache.org/repos/asf/superset.git
commit b17ccf58a7576e3e21836bb654644331fb0880a7
Author: alexandrusoare <al...@gmail.com>
AuthorDate: Thu Aug 27 23:45:15 2026 +0300
adding extra fields
---
.../src/dashboard/components/PropertiesModal/index.tsx | 9 +++++++++
.../PropertiesModal/sections/AccessSection.tsx | 3 +++
.../src/explore/components/PropertiesModal/index.tsx | 16 +++++++++++++++-
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
index ed1a4afae9a..d31f4e06aa9 100644
--- a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
+++ b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
@@ -79,6 +79,10 @@ type PropertiesModalProps = {
addSuccessToast: (message: string) => void;
addDangerToast: (message: string) => void;
onlyApply?: boolean;
+ renderExtraFields?: (context: {
+ assetId: number;
+ assetType: 'dashboard';
+ }) => React.ReactNode;
};
type DashboardInfo = {
@@ -107,6 +111,7 @@ const PropertiesModal = ({
onlyApply = false,
onSubmit = () => {},
show = false,
+ renderExtraFields,
}: PropertiesModalProps) => {
const dispatch = useDispatch();
const [form] = Form.useForm();
@@ -769,6 +774,10 @@ const PropertiesModal = ({
onChangeViewers={handleOnChangeViewers}
onChangeTags={handleChangeTags}
onClearTags={handleClearTags}
+ renderExtraFields={renderExtraFields?.({
+ assetId: dashboardId,
+ assetType: 'dashboard',
+ })}
/>
),
},
diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx
index aa274ed4cfd..88dbfa12325 100644
--- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx
+++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.tsx
@@ -38,6 +38,7 @@ interface AccessSectionProps {
onChangeViewers: (viewers: SubjectPickerValue[]) => void;
onChangeTags: (tags: { label: string; value: number }[]) => void;
onClearTags: () => void;
+ renderExtraFields?: React.ReactNode;
}
const AccessSection = ({
@@ -49,6 +50,7 @@ const AccessSection = ({
onChangeViewers,
onChangeTags,
onClearTags,
+ renderExtraFields,
}: AccessSectionProps) => {
const enableViewers = isFeatureEnabled(FeatureFlag.EnableViewers);
@@ -134,6 +136,7 @@ const AccessSection = ({
/>
</ModalFormField>
)}
+ {renderExtraFields}
</>
);
};
diff --git a/superset-frontend/src/explore/components/PropertiesModal/index.tsx b/superset-frontend/src/explore/components/PropertiesModal/index.tsx
index 6eb1c1795fc..be6e7eafaf3 100644
--- a/superset-frontend/src/explore/components/PropertiesModal/index.tsx
+++ b/superset-frontend/src/explore/components/PropertiesModal/index.tsx
@@ -16,7 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { ChangeEvent, useMemo, useState, useCallback, useEffect } from 'react';
+import {
+ type ReactNode,
+ ChangeEvent,
+ useMemo,
+ useState,
+ useCallback,
+ useEffect,
+} from 'react';
import {
Input,
@@ -56,6 +63,11 @@ export type PropertiesModalProps = {
permissionsError?: string;
addSuccessToast: (msg: string) => void;
addDangerToast: (msg: string) => void;
+ /** Optional render prop for injecting extra fields (e.g. folder selector). */
+ renderExtraFields?: (context: {
+ assetId: number;
+ assetType: 'chart';
+ }) => ReactNode;
};
function PropertiesModal({
@@ -65,6 +77,7 @@ function PropertiesModal({
show,
addSuccessToast,
addDangerToast,
+ renderExtraFields,
}: PropertiesModalProps) {
const [submitting, setSubmitting] = useState(false);
// values of form inputs
@@ -395,6 +408,7 @@ function PropertiesModal({
/>
</ModalFormField>
)}
+ {renderExtraFields?.({ assetId: slice.id, assetType: 'chart' })}
</>
),
},