`l` is not a function (reported from
See original GitHub issueDescribe the bug
Sentry Issue: CAMUNDA-MODELER-8P0
TypeError: l is not a function
at apply (./src/shared/ui/overlay/OverlayDropdown.js:62:10)
...
(11 additional frame(s) were not displayed)
We don’t pass onClose
in start instance:
<OverlayDropdown
title="Start current diagram"
className={ classNames(css.StartInstanceTool, { 'btn--active': this.state.activeButton }) }
items={ this.START_ACTIONS }
buttonRef={ this.anchorRef }
overlayState={ this.state.activeButton }
>
Steps to reproduce
- Open start instance
- Click the button again
Expected behavior
No error
Environment
- OS: [e.g. MacOS 10.2, Windows 10]
- Camunda Modeler Version: [e.g. 2.0.0]
- Execution Platform: [e.g. Camunda Platform, Camunda Cloud]
- Installed plug-ins: […]
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript error TypeError: "x" is not a function occurs when there is an attempt to call a function on a value or...
Read more >JavaScript: Uncaught TypeError: n is not a function
Uncaught TypeError: 'n' is not a function: This is a standard JavaScript error when trying to call a function before it is defined....
Read more >JavaScript error: "is not a function" - Stack Overflow
It was attempted to call a value like a function, but the value is not actually a function. Some code expects you to...
Read more >l.select(...).done is not a function error is thrown when delete ...
Hi @jivanova, I've this problem with a kendoMultiSelect widget. Selection of an item from the dropdown menu; Blur of kendoDropDownList widget ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nikku @barmac For visibility
Following some investigations, I’ll leave this in the state that it following RCA.
What happens
We make use of a component called
OverlayDropdown
in different places in the applicationOverlayDropdown
holds multiple different responsibilitiesshouldOpen
state variable as is the case withCreateNewAction
to force it open externallyStartInstanceTool
is using bothOverlayDropdown
, as well asStartInstanceConfigOverlay
for the second step. It attaches that second overlay into the button thatOverlayDropdown
provides to position itself.The overlay displaying state management logic ends up shared between
StartInstanceTool
andOverlayDropdown
, leading to hard to predict behavior.The main issues
OverlayDropdown
, which makes the code hard to read and hard to predict.OverlayDropdown
, which again contributes to issues in readability and predictability.Proposal
Right now, the only fix I could provide would be to make the
OverlayDropdown
a little more fault tolerant. But IMO the problem lies in how the whole component works, not our implementation of it. My fix would remove the exception, but actually this exception isn’t visible to the user in the first place, so it would be a monkey-patch only to make the debugger less red.In my view, this section is simply in need of a refactor.
What I would do, is separate out the toggling buttons and state management logic from the visual logic
OverlayDropdown
provides. We could then actually compose more complex overlay and handle state management in one place safely.This could be a good topic for a spring cleaning or slack time.