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

sap.m.SelectDialog clear/confirm button should be enabled in single selection mode #2379

Open
zypA13510 opened this issue Jan 17, 2019 · 7 comments · May be fixed by #2380
Open

sap.m.SelectDialog clear/confirm button should be enabled in single selection mode #2379

zypA13510 opened this issue Jan 17, 2019 · 7 comments · May be fixed by #2380

Comments

@zypA13510
Copy link
Contributor

zypA13510 commented Jan 17, 2019

OpenUI5 version: 1.60/latest

Browser/version (+device/version): Chrome v73 on Ubuntu (desktop)
Any other tested browsers/devices(OK/FAIL): not tested

URL (minimal example if possible): http://jsfiddle.net/zypA1310/L5cx4fut/

Steps to reproduce the problem:

  1. Run the above example (SelectDialog with showClearButton=true and multiSelect=false)
  2. Click on the value help button

What is the expected result?
In the opened dialog, there is some way to clear the content inside Input, either the clear button or by clicking confirm with an empty selection.

What happens instead?
In the opened dialog, the clear button is shown but disabled. Confirm button is not shown.

Additional information:
According to the doc, this is the intended way to clear value from Input with valueHelpOnly=true:

We recommended enabling of the Clear button in the following cases, where a mechanism to clear the value is needed: In case of single selection mode(default mode) for Select Dialog and rememberSelections is set to true. Clear button needs to be enabled in order to allow users to clear the selection. In case of using sap.m.Input with valueHepOnly[sic] set to true, Clear button could be used for clearing selection. In case the application stores a value and uses only Select Dialog to edit/maintain it.

Related: #898.

@TeodorTaushanov
Copy link
Member

Hi,

Thank you for sharing this finding. I've created an internal incident 1970047730. The status of the issue will be updated here in GitHub.

Regards,
Teodor

@niyap
Copy link
Contributor

niyap commented Jan 22, 2019

Hello @zypA13510 ,

Thank you for ticket. That is the expected behavior of the control.
You could clear your selection when singleSelection and valueHelpOnly are used, but to achive this, you have to adjust the application logic.
Here is a simple sample, how that could be achived: http://veui5infra.dhcp.wdf.sap.corp:8080/demokit/#/sample/sap.m.sample.SelectDialog/preview
Look at the last sample, where the scenario is the same as the one described by you.

Kind Regards,
Niya

@niyap niyap closed this as completed Jan 22, 2019
@zypA13510
Copy link
Contributor Author

zypA13510 commented Jan 22, 2019

@niyap
Hello Niya, thanks for your response. Unfortunately, I'm unable to open the link you provided. From the CDN distribution of demo kit (which I believe to be the same?), I can see the last sample. However, after clicking the clear button, there is no way to submit the dialog, the confirm button is not appearing due to it being single selection mode. I'm not sure if I missed anything.

I've also looked into the implementation and provided what I believed to be a fix in the PR.

@niyap
Copy link
Contributor

niyap commented Jan 22, 2019

Hello @zypA13510 ,

Yes, I got it. There was a little mistake in our sample, so we corrected it and it will be available with the next release.
The confirmation button is available in multi selection mode. But you could handle the discussed scenario with clearing the value on value help close. If there is no selected item, on pressing the "Cancel" button, just reset the value of the input field.

Regards,

@zypA13510
Copy link
Contributor Author

zypA13510 commented Jan 22, 2019

@niyap
But then, it would be very strange behavior, wouldn't it? When a user press "cancel", they usually expect whatever changes they have made in this dialog to be discarded instead of being committed.

Also, from the UX guideline:

Once users select an entry, the select dialog is closed and the selected entry is taken over. If applicable, the entry is displayed in the field from which the dialog was triggered.

IMHO, clearing the entry should be considered the same as "selecting" in the context of single selection mode, thus the dialog should have submitted itself when the clear button is pressed, instead of clear+cancel.

All in all, I'd say clear+cancel is not a very elegant solution to this issue. Rather, I suggest that either: the user press clear, then ok (needs to be displayed in single selection), or the user press clear and the dialog submits itself (in single selection mode).

@niyap
Copy link
Contributor

niyap commented Jan 25, 2019

Hello @zypA13510,

Thank you for your reply and your point of view!

We discussed with the UX designers, both the current behavior, your proposals and other possible solutions for that use case.
As a result, we took the decision to handle that as a feature request.
In that way, all the possible solutions will be evaluated.
We could not commit that the behavior would be changed for sure, since it would be evaluated and the desicion will be made after that.

Kind Regards,
Niya

@niyap niyap reopened this Jan 25, 2019
@flovogt
Copy link
Member

flovogt commented Mar 23, 2022

This enhancement request is covered in FIORITECHE1-3484 and FIORIDESIGN-614.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants