GSA / sam-design-system

https://gsa.github.io/sam-design-system/
Other
21 stars 14 forks source link

formly-autocomplet After selecting desired value when user clicks on Enter, Selected value should stay. #1448

Open NikhithaReddyG opened 5 months ago

NikhithaReddyG commented 5 months ago

Components Involved Please list the common component(s) involved that you're experiencing an issue with formly-autocomplete—basic Expected Behavior How you expect the listed component(s) to function fter selecting desired value when user clicks on Enter, Selected value should stay Actual Behavior How the listed component(s) actually function After selecting desired value when user Keeps cursor on the field and clicks on enter, it changes the selection. Your Environment Angular Version: X.Y.Z @gsa-sam packages version: X.Y.Z (Please list individually if all packages are not same version) 14 Ticket Number Please provide your JIRA ticket number that is dependent on this fix. If there is none, please create one to validate the issue once the fix has been released. DO NOT provide the url, please ONLY provide the ticket number. IAEDEV-4075 image - 2024-04-01T205945 707

Additional context Screenshots / recordings, minimal reproduction on stackblitz, steps to reproduce, code snippets, etc.

cwolf10 commented 5 months ago

Hi @NikhithaReddyG, I need some clarification on the steps to reproduce this. If I expand the autocomplete, arrow down to my selection, and hit enter I see the item I arrowed to selected (which is what seems to be your expectation).

I do see that you mention the user's cursor, are you expecting that by hovering over an option it is "selected" in the same way using the arrow keys to to highlight an item is selecting it?

NikhithaReddyG commented 5 months ago

Hi @NikhithaReddyG, I need some clarification on the steps to reproduce this. If I expand the autocomplete, arrow down to my selection, and hit enter I see the item I arrowed to selected (which is what seems to be your expectation).

I do see that you mention the user's cursor, are you expecting that by hovering over an option it is "selected" in the same way using the arrow keys to to highlight an item is selecting it?

To recreate: Select the Level 2 from the list (Other than first value, select any). And click on Enter (by keeping your cursor within the box.) [Selected value should not staying]. Let me know we can hop on a call to replicate this.

cwolf10 commented 5 months ago

I think I've got it. So expand the autocomplete and mouse over any option other than the first one, hit enter and the first option is selected. And with that behavior you are saying the first option should not be selected, it should just clear out as if you clicked somewhere else on the screen to close the autocomplete.

Am I understanding what your seeing and expecting correctly?

NikhithaReddyG commented 5 months ago

I think I've got it. So expand the autocomplete and mouse over any option other than the first one, hit enter and the first option is selected. And with that behavior you are saying the first option should not be selected, it should just clear out as if you clicked somewhere else on the screen to close the autocomplete.

Am I understanding what your seeing and expecting correctly?

It should be like this.. "expand the autocomplete, select any option other than the first one. Selected option will appear in the box. Stay in the box and click on Enter. Selected Option should stay. It should not change the selected option."