Questions tagged [memo]

144 questions
5
votes
1 answer

use React.memo with mapped collection

Somehow the react.memo (or the hook version) wont work when the components are "generated" by a map. code example: https://codesandbox.io/embed/react-memo-example-iuqf4 const Item = ({ step }) =>
{step.name}
; const MemoItem =…
pim
  • 53
  • 1
  • 1
  • 5
5
votes
1 answer

removing last blank line in memo

i searched google but can't seem to find a working solution. the situation is unique. i need to "add" lines with a comment at various times. whenever i press the F9 key, a line number will dispaly followed by a colon ":" char and then i enter some…
johnm2
  • 143
  • 3
  • 8
4
votes
0 answers

React memo prevProps is giving initial value always, not actual previous props

Main component: const AProfileFilter = ({ data = []) => { const [getData, setData] = useState([]); const [getStore, setStore] = useState([]); useEffect(() => { setData(prepareFilterData(data)); }, [data]); …
Jayesh Naghera
  • 319
  • 3
  • 13
4
votes
0 answers

How does React memoization work under the hood?

I'm curious how React memoization works under the hood. Specifically, I want to understand the tradeoff between runtime performance gains and memory usage. I want to know what is that total memory usage, and what is the behaviour of the memoization…
lcushman
  • 73
  • 4
4
votes
1 answer

Delphi - Get the whole word where the caret is in a memo

I need to be able to select the whole word of a TMemo if the caret is directly adjacent or in a word in the memo. Consider the following (where | is a caret) Here is some text| = Select text Here is so|me text = Select some |Here is some text =…
Simon
  • 9,197
  • 13
  • 72
  • 115
4
votes
0 answers

How to get which dependence cause useCallback / useMemo recalculate?

By using useMemo / useCallback hook in React, sometimes I find many unexpected render causing by useMemo / useCallback return value. As I use React.memo to reduce React function component useless render, by React.memo second param, I could control…
tomision
  • 964
  • 9
  • 22
4
votes
1 answer

Create Memo in R Markdown

I am trying to create the following memo format in R Mardown: https://texblog.org/2012/03/07/writing-a-memo-in-latex/ --- csl: texMemo.csl \memoto{someone} output: pdf_document --- I'm not sure where to put the text, whether it does in the YAML…
4
votes
3 answers

How to persist values after a memory warning viewDidUnload

My problem is when I use the camera UIImagePicker and the phone is low on memory. It throws a memory warning and unloads the view and then reloads. I know this is a very common problem and many questions are already in SO. I'm not going into this.…
carbonr
  • 6,049
  • 5
  • 46
  • 73
3
votes
1 answer

Buggy cursor in FireMonkey (Delphi XE2)

Delphi XE2 update 3, Windows 7. I have a memo, it's cursor is crIBeam. But when I move a mouse over the memo the cursor changes to crDefault and back. The swap repeats vary fast. I took a picture with the crDefault cursor but crIBeam must be…
maxfax
  • 4,281
  • 12
  • 74
  • 120
3
votes
1 answer

Delphi - Find text in large TMemo

I have a TMemo which contains quite a lot of texts, 80M (about 400K lines). The TMemo is set with WordWrap = FALSE, there is no need to find texts that wrapped in 2 lines. I need a fast way to find a text, from the beginning, and also find next. So,…
Kawaii-Hachii
  • 1,017
  • 7
  • 22
  • 36
3
votes
2 answers

Microsoft Access memo datatype to MySQL Datatype

What datatype in MySQL would be best to use for data that was in Memo on Microsoft Access?
suryll
  • 103
  • 2
  • 6
3
votes
1 answer

How to avoid re-renders in React when using conditional Render and children node prop

I have a component that I reuse most of its logic. I'm looking to avoid re-renders on its children components which happen every time I hover over the parent: const ReusableComponent = ({ conditional }) => { const [isHovered, setIsHovered] =…
3
votes
1 answer

How to add multiple lines from a TMemo component to a MS Access database?

I got an ADO Database with a table named t_codemeaning, below are the table structure : t_codemeaning codemenaing_code AS Text codemenaing_title AS Text codemenaing_description AS Text I add all of table in my ADOQuery1. I click a button…
Galvion
  • 1,353
  • 7
  • 23
  • 35
3
votes
0 answers

Magento partial refund programmatically

How can i create partial create memo? i.e. if total order value is £50 and I want to create a credit memo of £10. I am using the below code to create credit memo: function createCreditMemo($orderId) { $order =…
Hum
  • 531
  • 2
  • 12
  • 30
2
votes
4 answers

Is there any way to disable selecting of text in a memo control?

Is there any way to disable selecting of text in a memo control because it's very anoying. The memo is Read Only.
Little Helper
  • 2,419
  • 9
  • 37
  • 67
1
2
3
9 10