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(input): add and test input component #1

Merged
merged 3 commits into from
Jan 6, 2023

Conversation

lucasMurtaVI
Copy link
Contributor

No description provided.

src/components/input/method/isValid.js Show resolved Hide resolved
src/pages/componentList.js Outdated Show resolved Hide resolved
src/pages/componentList.js Outdated Show resolved Hide resolved
@@ -59,7 +60,7 @@ export default function BdsPatterValidation() {
{/* <bds-banner id="banner" variant="system" button-close="true">
Instabilidade na plataforma? Não se preocupe, já estamos resolvendo!
</bds-banner> */}
<bds-input ref={elementRf} placeholder="nome completo"></bds-input>
<bds-input ref={elementRf} placeholder="nome completo" pattern="/^[0-9]*$/"></bds-input>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Qualquer alteração no código, deverá ser mostrado no código em tela.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Esse evento não esta funcionando direito, tem q rever como ele foi feito. coloquei o pattern ai pq la no componente tem uma função q emite o evento se o pattern estiver preenchido.

@@ -4,7 +4,8 @@ export default function GetInputElementMethod() {

const inputGetInputElement = async (id) => {
const input = document.getElementById(id);
await input.getInputElement();
const inputElement = await input.getInputElement()
input.value = inputElement;
Copy link
Collaborator

Choose a reason for hiding this comment

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

O retorno está no value do input. É um retorno de muitos dados, pode fazer aquele card de outros exemplos aparecer e mostrar que o método foi chamado. Qualquer dúvida me chame no workchat.

@@ -4,7 +4,8 @@ export default function IsValidMethod() {

const inputIsValid = async (id) => {
const input = document.getElementById(id);
await input.isValid();
const validResult = await input.isValid()
input.value = validResult;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Retornando no próprio input, use o card dos outros exemplos para mostrar o valor de retorno.

@lucasMurtaVI lucasMurtaVI merged commit da85b79 into main Jan 6, 2023
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.

2 participants