I have an issue with focusing the next input in React Native. I use just one input called GeneralTextInput.tsx in the whole app. In this example I have 2 inputs ==> 1.Group Name, 2.Group Description So I give some props in the parent to this component: And this is my GeneralTextInput.tsx What should I give…
Category: Questions
How to pass index to child function
Here is the question. I want to pass index of each child element to the function handleChange, but I can’t get it))) When I click on TabPanelItem appears error handleChange is not a function What’s the problem? Parent Element: and my child component: Answer you made a mistake in this line you dont…
Firebase Firestore db.collection is not a function
I am developing a shift scheduler and I use firebase authentication and firestore. My idea is that when a user signs up it creates a document in collection “workers” and sets the doc id to the user’s email. When the user adds a shift I want to add the shift info into a sub-collection “…
Memoize a recursive Fibonacci function
I created a withMemo function that returns a memoized version of the provided function. How can I memoize this fibonacci function that works with recursion ? Indeed withMemo(fibo) doesn’t improve performance since the recursive calls inside fibo still point to the unmemoized version… So I have to …
Changing stroke color of LineSeries and/or AreaSeries in LightningChart
Is it possible to change the stroke color of LineSeries and/or AreaSeries in LightningChart JS based on point values? Example 1: Display the line as red when the y-value is above 10.0, but use blue color otherwise. Example 2: Display the line as yellow when x-value is between 1 and 10. Answer As far as curren…
Angular – function in ngFor called multiple times
I have a template: Component and service: I want to fetch the list of trucks in my template based on a parameter cargo.id. I’m getting data from backend but the function getTrucksByUserIdAndRules(cargo.id) is called multiple times. I know this is not a good practise to use functions inside template and …
mongodb collection uuid how to update?
How to create collection in mongodb with specific uuid or update the uuid ? Adding details: When I create a collection mongodb generate automatically uuid and if this is replicaSet the uuid is replicated to all SECONDARY members via the oplog: But I would like to know if there is an option this UUID to be cre…
Web Speech API – SpeechSynthesisUtterance onmark event wont fire
I cannot get the “onmark” event to fire in Chrome or Edge while using SSML. I have tried this in Chrome and Edge and wrote code based on standards at https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API Answer The onboundary event doesn’t seem to be fired correctly on Chrome, for …
Show GIF and text, only when button is clicked
When I click the button the image does not show up along with the text, this is what I have tried so far: Answer 1) TYPO: There is no method as getElementByClassName, instead it is getElementsByClassName. 2) getElementsByClassName will return an array-like data structure, so you have to fetch the HTML element…
How to get all the favicon from the site, by url
Here is my parser: It returns an array of URLs, with all URL favicons. How can the user get these favicons? when entering the URL in the input and get the favicons. Like google labels, we enter the URL and get the labels with the favicon How can I do the same thing? Answer I hope this example would help: