React, Component that edits the HTML of the next component? - reactjs

I have a strange case.
I must use a table library that has few features. There is no way to use react-table or more popular libraries.
I need the following feature => In the first column there are icons. If someone clicks on this icon, a new <tr><td>xyz</td></tr> should appear straight after this row.
It's a sort of tooltip, but instead of appearing on top of other content it should "add itself" between the row it has been triggered from and the next row.
I have no idea how to approach that.
The only things I have access to is the row index of the row the model was triggered from.
Is it feasible in React to create a component that somehow pushes a <tr> after the current td closes?
I am wondering if in react it's possible to manipulate HTML in a similar way, no matter if it is a bad practice...
Or maybe somehow running plain JavaScript is the only solution?
Any idea that helps me find a solution would be much appreciated.

Related

react-notifications-component custom content example

I am using react-notifications-component and I see that I can have a custom component shown by setting .content of the iNotification object passed to Store.addNotification(). I would like to add a control to the existing component that comes with this library (I want to add a button to copy the message to the clipboard). If I could extend the existing component, this could be relatively easy, but I don't see how to do this. I don't want to "reinvent the wheel" since the 'native' component works and looks great.
Does anyone have examples of this type of functionality?
Thanks.
I dont think there is way to do it, unless you ask the author.. But honestly its fairly easy to implement own component that looks just like the original one, so I dont think it would even make sense to have this functionality, but you can ask..
Anyway I played around and made custom component which copies text ( but from input not from a div therefore the style broke a bit, but if you have a div it again looks just the same..
working example

Pop up menu in React Data Tables

I want to implement this pop up menu in my project (the three dots that appear to the right of every row in this story):
https://jbetancur.github.io/react-data-table-component/?path=/story/custom-styles-google-sheets-esque--google-sheets-esque
I'm as good as inserting a component as a column that repeats on each row, but I don't know how to build the menu itself.
Looking at the code, it seems that the key is in the CustomMaterialMenu from '../shared/CustomMaterialMenu' component, but I can't find its source code, I don't know if it's part of React Data Tables or something trivial.
Thanks

React Slick - slickToGo doubts

I'm trying to use React Slick to display several cards.
I want that on entering the page with the slider this will slide to the selected/highlighted slide.
But I cannot find a way to get an index or identifier from the react-slider, maybe I'm missing some information.
All the examples show a way to track slides, but for my case (at least I think so) I'll need to have them already indexed so I can target the one I want. Any ideas?

React Js Autocomplete Multi select example

I'm pretty new to React Js, I have a requirement for building AutoComplete Multiselect dropdown.
Despite looking around for lot of examples,
I was suggested not use any third party libraries. And pretty
clueless how to start and proceed further.
My requirements are
Have an input text box for typing names.
Display sugggested name with checkbox.
Upon checking the names, they must be display in an with an 'X' symbol(remove item)
If I uncheck the name from the multiselect dropdown, it must be removed from the li.
If I Click the 'X' it should be removed from the li and uncheck the item from dropdown list.
And lastly , I need to display the selected items in the input fields like
I've been trying to implement this functionality but figure out how.
Can anyone please provide some reference and any guidance in implementing this functionality or any examples. It would be a great help.
Thanks
I'm not sure why the recommendation against third party libraries. These component can get complicated fast.
I recommend you use a third party. Don't reinvent the wheel!
Something like https://github.com/JedWatson/react-select will do what you want. It has been around for years and has over 300 contributors and 2 million weekly downloads.

how to change the position of textfield in adf forms?

Hi friends i am using jdev 11g release2 (11.1.2.4.0).I want to create a registration form from dragging datas from data control and my question was how to change or move the position of textfield in that form into different areas?
You should be using various layout components to achieve the layout you want, and remember that layout components can be nested to create more complex layouts.
See some examples here:
http://jdevadf.oracle.com/adf-richclient-demo/faces/feature/layoutForm.jspx
You can use the view source menu to see how they achieved that.
http://jdevadf.oracle.com/adf-richclient-demo/faces/feature/layoutBasics.jspx
Please be a bit more clear in your query. From what I was able to make out:
You can either use the "code view" of the JDev to move the code which represents the component to a different location or use the "Design view" to drag and move the component.
I would recommend the first approach as it makes it easier to manage the code/layout
You can change the position of the fields within the form or you can drag them out. However for this you should try out some tests and see which suits you best. I think if you surround each attribute with "Panel label and message" you will have a better view of your page.

Resources