Skip to content

Category: Questions

nodejs ejs render array object in to table

Good day I need to write a table from a database and i can’t access the values, if the array is greater than 1… If i do it like this: and on the ejs side it looks like this: if i use my hardcoded value, it works. But if i try to change the i value to 2 or more,

Only update one item from ReactJS state items

Problem: I am trying to modify only one item from plan data using this.setState({ planData: { id: plan }}); but by doing so, all my other items become undefined. I found a workaround by adding all other items to my setState, but it doesn’t look good at all. Is there a way to only modify a single item fr…

search autocomplete ajax in laravel

I am using ajax for live searching, but the problem is that It is shown only one result when I am using .html() but when I am using append() it works but every word i write it to duplicate the results, here is my code: in controller, ajax code in blade Answer Yes you set your content in your loop

Add Tooltip over a button

I’m trying to create a button which copies into clipboard content from variable using TypeScript and Material-UI. I tried this: Button to call above code: Do you know how I can add Tooltip https://mui.com/components/tooltips/ over the button to display message for successful copy when the text is copied…