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

Create autocomplete component #102

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

paulinaczybir
Copy link
Collaborator

@paulinaczybir paulinaczybir commented Aug 13, 2024

  • Create Autocomplete component
  • Small style alignments in Select component after review with Max T.

UI reviewed with Max T.

type: String,
default: '',
},
optionTextFn: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

where is this used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was not, deleted. Thanks!

type: Function,
default: null,
},
propText: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

would be better to name it propId

Copy link
Collaborator

Choose a reason for hiding this comment

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

although it matches ui-select interface :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If our options are passed as array of objects, this prop is used for deciding which key should be used to display the text so in my opinion makes sense to be named like this. The default 'id' value may be replaced by 'name', 'label' etc, then calling it propId could be more confusing

Copy link
Collaborator

Choose a reason for hiding this comment

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

propKey then :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But there is another one called propValue having the same idea, where we decide which key from same object will be used as a value of the selected element. Maybe the naming is not perfect, but it captures ok what is this prop used for, plus anyway as you mentioned it matches the 'select' and I prefer to keep consistency :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

okay, you are right I think it should be changed in both places, maybe later. because it's a key, it should be unique.

@paulinaczybir paulinaczybir force-pushed the LITE-30695-create-autocomplete-component branch from 30dbad1 to 33b2ea9 Compare August 14, 2024 10:58
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 95%)

See analysis details on SonarCloud

@paulinaczybir paulinaczybir merged commit 9c2e9f4 into master Aug 14, 2024
6 of 9 checks passed
@paulinaczybir paulinaczybir deleted the LITE-30695-create-autocomplete-component branch August 14, 2024 14:56
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