fix: made reranker not disable when hybrid search is enabled (#7622)
* added toggle_disable option
* made toggle be disabled when toggle_disable is true
* added logic to disable toggle when choosing hybrid search
* Updated starter projects
* Fixed toggle_disable to be optional
* fixed toggle disable to remove toggle
* ✅ (intComponent.spec.ts): update test assertions to match expected behavior after changes in the component's functionality
---------
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
parent
28675d873f
commit
7fb400d99e
8 changed files with 19 additions and 4 deletions
|
|
@ -18,6 +18,7 @@ export default function DropdownComponent({
|
|||
handleNodeClass,
|
||||
toggle,
|
||||
toggleValue,
|
||||
toggleDisable,
|
||||
...baseInputProps
|
||||
}: InputProps<string, DropDownComponentType>) {
|
||||
const onChange = (value: any, dbValue?: boolean, skipSnapshot?: boolean) => {
|
||||
|
|
@ -44,7 +45,7 @@ export default function DropdownComponent({
|
|||
handleOnNewValue={handleOnNewValue}
|
||||
{...baseInputProps}
|
||||
/>
|
||||
{toggle && (
|
||||
{toggle && toggleDisable !== true ? (
|
||||
<ToggleShadComponent
|
||||
value={toggleValue ?? true}
|
||||
handleOnNewValue={(data) => {
|
||||
|
|
@ -57,6 +58,8 @@ export default function DropdownComponent({
|
|||
id={`toggle_dropdown_${id}`}
|
||||
disabled={disabled}
|
||||
/>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ export function StrRenderComponent({
|
|||
name={templateData?.name!}
|
||||
toggle={templateData.toggle}
|
||||
toggleValue={templateData.toggle_value}
|
||||
toggleDisable={templateData.toggle_disable}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ export type DropDownComponentType = {
|
|||
handleNodeClass: (value: any, code?: string, type?: string) => void;
|
||||
toggle?: boolean;
|
||||
toggleValue?: boolean;
|
||||
toggleDisable?: boolean;
|
||||
};
|
||||
|
||||
export type TextAreaComponentType = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue