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
{{ message }}
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Getting Error in console on Button Click
Uncaught TypeError: Cannot read property 'ask' of undefined at Function../node_modules/@stardust-ui/react/dist/commonjs/lib/isFromKeyboard.js.IsFromKeyboard.state (isFromKeyboard.js:14) at Button._this.handleFocus (Button.js:70) at HTMLUnknownElement.callCallback (react-dom.development.js:100) at Object.invokeGuardedCallbackDev (react-dom.development.js:138) at Object.invokeGuardedCallback (react-dom.development.js:187) at Object.invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:201) at executeDispatch (react-dom.development.js:466) at executeDispatchesInOrder (react-dom.development.js:488) at executeDispatchesAndRelease (react-dom.development.js:586) at executeDispatchesAndReleaseTopLevel (react-dom.development.js:597)
Steps
Add a Button to trigger the Portal component.
Click the trigger button
Error can be seen in the console
Below is the sample code
exportclassAddCollectionControlextendsReact.Component<{},IAddCollectionControlState>{private_fields: {[key: string]: string;}={};constructor(props: any){super(props);this.state={shouldOpenModal: false};}publicrender(){return(<><Dialogopen={this.state.shouldOpenModal}><AddCollectionFormonFieldValueChange={this._onFieldValueChange}/></Dialog>{this._getAddButton()}</>);}private_close=()=>{this.setState({shouldOpenModal: false});};private_onFieldValueChange(name: string,value: string){this._fields[name]=value;}private_handleClick=()=>{this.setState({shouldOpenModal: !this.state.shouldOpenModal});};private_getAddButton=()=>(<Buttoncontent="Add a new collection"onClick={this._handleClick}/>);}