Skip to content

Conversation

@eszkadev
Copy link
Contributor

  • renamed Util.Dropdown from .js to .ts
  • added missing types
  • removed prettier ignore

helps to prevent mistakes when using dropdown which is used in many contexts (combobox, menubutton, standalone menus, submenus), followup for #13903

Signed-off-by: Szymon Kłos <[email protected]>
Change-Id: I1b78a06bbeb004041389692a66823784cdb87814
@eszkadev eszkadev requested a review from Minion3665 as a code owner December 23, 2025 09:45
@eszkadev eszkadev force-pushed the private/eszkadev/jsdialog-dropdown-ts branch from 4991858 to 4d3ea5e Compare December 23, 2025 09:46
- renamed Util.Dropdown from .js to .ts
- added missing types
- strict checking

helps to prevent mistakes when using dropdown which is used in many contexts (combobox, menubutton, standalone menus, submenus), followup for #13903

Signed-off-by: Szymon Kłos <[email protected]>
Change-Id: Idc374a1fef73cc8d02cf165d259077df2a2f1c2b
Signed-off-by: Szymon Kłos <[email protected]>
Change-Id: Ie0d539bd756d006d0c565c25d2ba38216f422005
Copy link
Member

@dennisfrancis dennisfrancis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left one comment in the second patch. Other than that the changes look fine to me.

let pos = -1;
if (typeof data === 'number') pos = data;
else pos = data ? parseInt(data.substr(0, data.indexOf(';'))) : -1;
const entry = targetEntries && pos !== null ? targetEntries[pos] : null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be pos !== -1 as pos is now only a number ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Review

Development

Successfully merging this pull request may close these issues.

2 participants