question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUESTION] model.get('toolbar') always return null

See original GitHub issue

Hi @artf I am trying to add a custom toolbar to my custom component without changing the default toolbar. So I expect it to be like [movable, copyable, removable, newToolbar]. I use this #266 as a reference.

model: {
  // ...
  initToolbar () {
    const tb = this.get('toolbar')

    console.log(tb) // Return null
    tb.unshift({
      attributes: { class: 'fa fa-plane' },
      command: 'some-command'
    })

    this.set('toolbar', tb)
  },
  // ...
}

But strangely this.get('toolbar') always return null. Is this something normal?

I got this instead toolbar image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
afdallahcommented, Jul 12, 2019

I am so sorry, it’s my mistake. Thanks for your guidance

1reaction
artfcommented, Jul 11, 2019

The extendFn was added from https://github.com/artf/grapesjs/releases/tag/v0.14.61 in the demo you’re using the 0.14.57

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android: getSupportActionBar() always returns null in ...
The demo code is doing what you are saying, and it crashes with an NPE. It does the same thing in my app...
Read more >
Bitmap | Android Developers
If the conversion is not supported, or the allocator fails, then this returns NULL. The returned bitmap has the same density and color...
Read more >
Selected Items from batch enabled Grid always null on POST ...
I have a Grid with batch editing enabled. It also features a custom toolbar with an additional button: 'Archive'.
Read more >
API Reference - Tableau Help
This section describes classes and methods of the Tableau JavaScript API. The JavaScript API files are located on the server (including Tableau Cloud...
Read more >
Google Visualization API Reference | Charts
Adds a new column to the data table, and returns the index of the new column. All the cells of the new column...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found