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
When defining codeControls, TS sees all those lovely string values as marks them as string type, when EuiControlBar has stricter validation, e.g. controlType: 'button' has additional rules.
Instead of const codeControls = [, add a type definition with
This forces TS to resolve those strings into the expected types, and also helpfully flags the 2nd-from-the-last control as incorrect, as our typescript definition for icon is incomplete and does not like the onClick parameter. You can cheat here by passing onClick: (() => {}) as any as undefined, to get around the error while we fix the types.
ControlBar demos don't work when pasted into a new
tsx
fileEUI: 24.0.0
The text was updated successfully, but these errors were encountered: