wrappid / core

This is a Wrappid package repository that contains core functionalities of Wrappid Framework that enables users to use Wrappid's core features and components.
MIT License
10 stars 4 forks source link

bugfix: sanitizeComponentProps function dosen't have logic for specific types like object #139

Closed Edithmark42 closed 4 months ago

Edithmark42 commented 4 months ago

Issue Description Missing Logic for Object in sanitizeComponentProps Function

Problem The sanitizeComponentProps function currently lacks specific logic for handling object props. This omission can lead to unexpected behavior when passing object props to components.

Proposed Solution We need to enhance the sanitizeComponentProps function to handle object-style props appropriately. This involves identifying object props, validating their structure, and ensuring they conform to expected patterns.

Steps to Reproduce

  1. Create a component that accepts object props (e.g.,

<CoreSnackbar open={openSnackbar} anchorOrigin={{ horizontal: "left", vertical: "top" }} autoHideDuration={6000} onClose={handleCloseSnackbar} /> ).

  1. Pass the object props to the component.
  2. Observe whether the props are correctly sanitized and applied.

Expected Outcome: The sanitizeComponentProps function should intelligently handle object type props, ensuring that they are properly sanitized and do not cause unintended side effects.

Edithmark42 commented 4 months ago

@todo mentioned.

techoneel commented 4 months ago

This issue is resolved.