From 61b0c0f509ce9b050332a82411f9cdfaf2625e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 21 Mar 2024 13:04:44 +0000 Subject: [PATCH] Add a onOptionClick option to the Selector --- web/src/components/core/Selector.jsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/web/src/components/core/Selector.jsx b/web/src/components/core/Selector.jsx index 243695d0f2..383fc55a16 100644 --- a/web/src/components/core/Selector.jsx +++ b/web/src/components/core/Selector.jsx @@ -20,8 +20,8 @@ */ // @ts-check -import React from 'react'; -import { noop } from '~/utils'; +import React from "react"; +import { noop } from "~/utils"; /** * @callback onSelectionChangeCallback @@ -62,6 +62,7 @@ import { noop } from '~/utils'; * @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. + * @param {function|undefined} [props.onOptionClick] - Callback to be called when the selection changes. * @param {object} [props.props] - Other props sent to the internal selector