-
Notifications
You must be signed in to change notification settings - Fork 38
fix the missing current chosen value inside the Access- policy -role drop down #1427
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
base: develop
Are you sure you want to change the base?
fix the missing current chosen value inside the Access- policy -role drop down #1427
Conversation
|
Hi @EnsiyehE |
|
Use Run test server using develop.opencast.org as backend: Specify a different backend like stable.opencast.org: It may take a few seconds for the interface to spin up. |
|
This pull request has conflicts ☹ |
|
This pull request has conflicts ☹ |
|
Either this isn't working for me, or I'm completely missing what changed. |
|
Hello Greg, To explain briefly: if you go to the Series tab, then open Series Details and the Access Policy tab, each dropdown previously did not include the currently chosen value from the input field among its options. I have now fixed that part. However, in the original issue, it was also requested that the dropdown should focus on that selected value, which I believe by default always focuses on the first option and i could only reach to bring back the previously chosen value inside the options Thank you for the feedback bests |
Arnei
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Selected roles now appear in the dropdown of their select field, as such this PR achieves what it intends to do.
This breaks the "Users" and "Roles" split in the ACL tab that is active when user role sanitization is disabled. It should not break that.
|
|
||
| // @ts-expect-error: React-Select typing does not account for the typing of option it itself requires | ||
| components: { MenuList }, | ||
| filterOption: createFilter({ ignoreAccents: false }), // To improve performance on filtering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, did you test if this actually performance on filtering and if so, by how much?
| isOptionSelected: (option, _selectValue) => { | ||
| const typedOption = option as DropDownOption; | ||
| if (isAclDropDown) { | ||
| return false; | ||
| } | ||
| return typedOption.value === value; | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So from what I understand, what this does is that if the Dropdown is defined as an AclDropdown, there is never an option selected. I don't understand why we wouldwant that, what is this supposed to achieve?
Hello all,
I have achieved to fix the missing current chosen value access policy role to the drop down options , but due to fix size and some other issues i have not been able to change the focus to the current selected value , so this PR only solves part of the the issue mentioned in #1405
please review and let me know about my issues
thank you for your time
best regards
Ensiyeh