Skip to content

Commit

Permalink
[web] Minor core/Selector adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Feb 14, 2024
1 parent 6ffe93b commit aeb4a29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions web/src/components/core/Selector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ import { noop } from '~/utils';
* );
*
* @param {object} props - component props
* @param {string} [props.id] - Id attribute for selector.
* @param {boolean} [props.isMultiple=false] - Whether the selector should allow multiple selection.
* @param {Array<object>} [props.options=[]] - Item objects to build options.
* @param {function} [props.renderOption=noop] - Function used for rendering options.
* @param {Array<object>} props.options=[] - Item objects to build options.
* @param {function} props.renderOption=noop - Function used for rendering options.
* @param {string} [props.optionIdKey="id"] - Key used for retrieve options id.
* @param {Array<*>} [props.selectedIds=[]] - Identifiers for selected options.
* @param {onSelectionChangeCallback} [props.onSelectionChange=noop] - Callback to be called when the selection changes.
Expand Down Expand Up @@ -91,7 +92,7 @@ const Selector = ({
};

return (
<ul { ...props } data-type="agama/list" role="grid">
<ul { ...props } id={id} data-type="agama/list" role="grid">
{ options.map(option => {
const optionId = option[optionIdKey];
const optionHtmlId = `${id}-option-${optionId}`;
Expand Down

0 comments on commit aeb4a29

Please sign in to comment.