fix the missing current chosen value inside the Access- policy -role drop down#1427
fix the missing current chosen value inside the Access- policy -role drop down#1427EnsiyehE wants to merge 8 commits intoopencast:developfrom
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.
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.
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.
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?
|
This pull request has conflicts ☹ |
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