UI: Update engine dropdowns (#26806)

* Update search-select component
- Add aria-label arg
- use label or humanized ID as fallback aria-label
- protect against non-array options arg

* remove overflow-x rule on toolbar-scroller so dropdowns can render in place

* add renderInPlace to dropdowns in pki engine

* Update replication package.json and add renderInPlace

* Add renderInPlace to search-select and basic-dropdown in engines (kubernetes, kv, ldap, sync)

* small cleanup
This commit is contained in:
Chelsea Shaw
2024-05-03 12:09:03 -05:00
committed by GitHub
parent efa3f93e5f
commit 2a99b3651f
17 changed files with 60 additions and 22 deletions

View File

@@ -49,6 +49,7 @@ import { addToArray } from 'vault/helpers/add-to-array';
* @param {string} id - The name of the form field
* @param {string} [label] - Label for this form field
* @param {string} [labelClass] - overwrite default label size (14px) from class="is-label"
* @param {string} [ariaLabel] - fallback accessible label if label is not provided
* @param {string} [subText] - Text to be displayed below the label
* @param {string} fallbackComponent - name of component to be rendered if the API call 403s
* @param {string} [helpText] - Text to be displayed in the info tooltip for this form field
@@ -142,7 +143,7 @@ export default class SearchSelect extends Component {
}
if (!this.args.models) {
if (this.args.options) {
if (Array.isArray(this.args.options)) {
const { options } = this.args;
// if options are nested, let parent handle formatting - see path-filter-config-list.js
this.dropdownOptions = options.some((e) => Object.keys(e).includes('groupName'))