Skip to content

Commit

Permalink
Merge pull request lowcoder-org#1499 from lowcoder-org/fix/show_indic…
Browse files Browse the repository at this point in the history
…ator_on_event_panel

Fix showing indicator on event panel headers
  • Loading branch information
FalkWolsky authored Feb 7, 2025
2 parents 22896e8 + 9f02fc7 commit 80934b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const KeyValueList = (props: {
return (
<>
{props.list.map((item, index) => (
<IndicatorWrapper key={index}>
<IndicatorWrapper key={index} indicatorForAll={props.indicatorForAll}>
<KeyValueListItem key={index /* FIXME: find a proper key instead of `index` */}>
{item}
{!props.isStatic &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ const ExecuteQueryPropertyView = ({
placement?: "query" | "table"
}) => {
const getQueryOptions = useCallback((editorState?: EditorState) => {
const options: { label: string; value: string; variable?: Record<string, string> }[] =
const options: { label: string; value: string; variables?: Record<string, string> }[] =
editorState
?.queryCompInfoList()
.map((info) => {
return {
label: info.name,
value: info.name,
variable: info.data.variable,
variables: info.data.variables,
}
})
.filter(
Expand Down Expand Up @@ -79,7 +79,7 @@ const ExecuteQueryPropertyView = ({
onChange={(value) => {
const options = getQueryOptions(editorState);
const selectedQuery = options.find(option => option.value === value);
const variables = selectedQuery ? Object.keys(selectedQuery.variable || {}) : [];
const variables = selectedQuery ? Object.keys(selectedQuery.variables || {}) : [];
comp.dispatchChangeValueAction({
queryName: value,
queryVariables: variables.map((variable) => ({key: variable, value: ''})),
Expand Down

0 comments on commit 80934b5

Please sign in to comment.