Skip to content
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(web): edit sketch custom properties [VIZ-1429] #1531

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ type CustomPropertyFieldProps = {
showEditFieldConfirmModal?: boolean;
onSubmit?: (schema: CustomPropertyProp, newTitle?: string) => void;
onClose?: () => void;
onCustomPropertySchemaState?: () => void;
onSchemaJSONUpdate?: Dispatch<SetStateAction<Record<string, string>>>;
};

Expand All @@ -52,7 +51,6 @@ const CustomPropertyFieldModal: FC<CustomPropertyFieldProps> = ({
onClose,
onSubmit,
onSchemaJSONUpdate,
onCustomPropertySchemaState
}) => {
const t = useT();
const [customPropertyTitle, setCustomPropertyTitle] = useState(
Expand All @@ -66,8 +64,7 @@ const CustomPropertyFieldModal: FC<CustomPropertyFieldProps> = ({

const openEditFieldConfirmModal = useCallback(() => {
setShowEditFieldConfirmModal(true);
onCustomPropertySchemaState?.();
}, [onCustomPropertySchemaState]);
}, []);

const closeEditFieldConfirmModal = useCallback(() => {
setShowEditFieldConfirmModal(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,5 @@ export default function useHooks(
handleEditField,
handleSubmit,
setSchemaJSON,
handleCustomPropertySchemaState
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const CustomPropertiesSchema: FC<Props> = ({
handleEditField,
handleSubmit,
setSchemaJSON,
handleCustomPropertySchemaState
} = useHooks(layerId, customPropertySchema);

return (
Expand Down Expand Up @@ -87,7 +86,6 @@ const CustomPropertiesSchema: FC<Props> = ({
onClose={closeCustomPropertySchema}
onSubmit={handleSubmit}
onSchemaJSONUpdate={setSchemaJSON}
onCustomPropertySchemaState={handleCustomPropertySchemaState}
/>
)}
{showDeleteFieldConfirmModal && (
Expand Down
Loading