You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It receives an options parameter typed as any[], although the real type options seem to be being passed as is VariableValueOption, as defined in the scenes/packages/scenes/src/variables/types.ts file:
Both sortByNumeric and sortByNaturalSort internal sort strategies defined inside the sortVariableValues function seem to try to sort options based on an attribute called text, but, as we can see, the VariableValueOption doesn't have any text attribute. It seems like sortByNumeric and sortByNaturalSort should be checking the label attribute instead. Is there any reason not to do that? Am I missunderstanding somehing?
Thank you.
The text was updated successfully, but these errors were encountered:
Function
sortVariableValues
in file scenes/packages/scenes/src/variables/variants/query/utils.ts seems unable to really sort variables.It receives an
options
parameter typed asany[]
, although the real type options seem to be being passed as isVariableValueOption
, as defined in the scenes/packages/scenes/src/variables/types.ts file:Both
sortByNumeric
andsortByNaturalSort
internal sort strategies defined inside thesortVariableValues
function seem to try to sort options based on an attribute calledtext
, but, as we can see, theVariableValueOption
doesn't have anytext
attribute. It seems likesortByNumeric
andsortByNaturalSort
should be checking thelabel
attribute instead. Is there any reason not to do that? Am I missunderstanding somehing?Thank you.
The text was updated successfully, but these errors were encountered: