Skip to content

Increment field id in the print area#295

Closed
ofostier wants to merge 4 commits intobndw:masterfrom
ofostier:Increment-field-ID-in-the-print-area
Closed

Increment field id in the print area#295
ofostier wants to merge 4 commits intobndw:masterfrom
ofostier:Increment-field-ID-in-the-print-area

Conversation

@ofostier
Copy link
Copy Markdown
Contributor

@ofostier ofostier commented Jun 7, 2024

With this Fix we can now print more than 1000 card without error & lags

Comment thread src/components/WifiCard.js Outdated
<Pane width={'100%'}>
<TextareaField
id="ssid"
id={'ssid' + (props.keyid === undefined ? '' : props.keyid)}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do this logic once outside of the return and then reuse it everywhere, maybe something like:

const keyid = props.keyid || '';
const suffixKeyID = (prefix) => `${prefix}-${keyid}`

...

return (
  <textarea>
    id={suffixKeyID('ssid')}
     ...
  </textarea>
  <otherthing>
     id={suffixKeyID('eapmethod')}
     ...
  </otherthing>
)

@ofostier
Copy link
Copy Markdown
Contributor Author

Changes made.
Better logic but maybe a lack performance with more than 400 cards to print

@ofostier ofostier requested a review from bndw June 13, 2024 15:32
@bndw bndw mentioned this pull request Jan 25, 2026
@bndw bndw closed this Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants