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

feat(components/molecule/phoneInput): add onPrefixChange prop #2642

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

1izpena
Copy link
Contributor

@1izpena 1izpena commented Sep 28, 2023

Add onPrefixChange prop for detecting changes from selected prefix

Molecule/PhoneInput

🔍 Show

TASK:

Description, Motivation and Context

Types of changes

  • 🪲 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🧾 Documentation
  • 📷 Demo
  • 🧪 Test
  • 🧠 Refactor
  • 💄 Styles
  • 🛠️ Tool

@github-actions
Copy link

STATEMENTS BRANCHES FUNCTIONS LINES
≍ 0.01↑ ≍ 0.02↑ ≍ 0.07↑ ≍ 0.07↑
% 76.18 63.48 65.72 77.86
ABS 3331 / 4372 1959 / 3086 648 / 986 3204 / 4115

@@ -77,6 +79,11 @@ export default function MoleculePhoneInput({
}
}, [])

useEffect(() => {
onPrefixChange(selectedPrefix)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tal vez si que haria que en el nuevo onPrefixChange, devolviera el mismo objeto que devuelve el onChange, es decir {name, prefix, value}

@1izpena 1izpena merged commit 9f62645 into master Sep 28, 2023
7 checks passed
@1izpena 1izpena deleted the XCOMP-10406-phone-input-prefix branch September 28, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants