Can I change the react-draft-wysiwyg toolbar options dynamically? - reactjs

I'm using useStatetoolbar, setToolbar to save toolbar options and change that when some event call.
But options not changed. any idea how can I achieve it?

Related

ReactJS MUI v5 Autocomplete create option always visible

As in documentation MUI Autocomplete is able to create an option using freeSolo prop. New option appears at the bottom only when the user start typing. Is it possible to move that option at top and make it always visible? I may reorder it with flexbox, so this should not be a problem that much if it can not do it automatically. The problem is the visibility of that option.
I want to open a drawer when it is clicked, so I do not need that typed text information.
That option Add "something" should be always visible, how is it possible?

Next JS Custom Select dropdown icon on click does not trigger the options to display

I am new to Next JS and I have a custom select menu dropdown with an array of options. The select has an arrow icon that I included by using css psudo ::after with background image. When the user clicks the icon(svg), the dropdown is not triggered and I am not sure how to make this work.
I have tried using useRef and setting it to the component then on button click I tried to use ref.current.click() which doesnt trigger the drop down.
I also tried including the arrow icon inside the component rather than use CSS but this was unsuccessful as well.
Can someone please advise me how to make this functionality work? Thank you in advance for any help, it is much appreciated.

Component as grid emptyText in ExtJS?

I want to display a component as emptyText for a grid, the ExtJS documentation states that only HTML can be shown.
For example a button that pop-ups a create window, as shown below:
Is there a workaround to use a component in a grid, or perhaps even a config that I'm missing?
Of course you can do that, just that you will have to debug a lot in order to see how to do that. That's why I have an alternative: add a hidden docked toolbar with your "Create new employee" button. Then add an listener for the load store event, and when no records are available, simply show the toolbar, otherwise hide the toolbar.

Enabling Disabling TextField on the fly

I am using extjs-4, I want to enable/disable textfield on the fly depending upon data being loaded.
I tried setting disabled and readOnly property to true/false whenever needed but it doesn't seem to get applied.
Is there any other way to achieve it?
Call the setDisabled and setReadOnly methods on the TextField to manipulate those properties after the field is created.

ExtJS Grid toolbar

My ExtJS grid is attached with action tbar, now in the handler of the toolbar buttons I need to have the grid instance. One way I can do it using
this.findByParentByType("grid"). Is there any better way that I can get the grid instance??
You can also use the ownerCt var to access the parent element. Based on the nesting level you will minimal need ownerCt.ownerCt from the button instance to access the grid. FindParentByType does basicly the same and checks each type. Firebug and console.log will help you with further debuging. EDIT:I forgot the Ext.getCmp that can be used to find an object by it's id.
You can also get parent grid by giving scope scope:this to toolbar button, then in handler you will get grid instance in 'this' variable.

Resources