Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pro:textarea): add rows prop #1518

Merged
merged 1 commit into from Apr 13, 2024
Merged

Conversation

kovsu
Copy link
Member

@kovsu kovsu commented Mar 27, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

What is the new behavior?

Other information

@idux-bot
Copy link

idux-bot bot commented Mar 27, 2023

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Merging #1518 (0e295c6) into main (c758931) will decrease coverage by 0.03%.
The diff coverage is 10.00%.

❗ Current head 0e295c6 differs from pull request most recent head 573db78. Consider uploading reports for the commit 573db78 to get more accurate results

@@            Coverage Diff             @@
##             main    #1518      +/-   ##
==========================================
- Coverage   92.77%   92.75%   -0.03%     
==========================================
  Files         332      332              
  Lines       30897    30905       +8     
  Branches     3556     3556              
==========================================
+ Hits        28666    28667       +1     
- Misses       2231     2238       +7     
Impacted Files Coverage Δ
packages/pro/textarea/src/ProTextarea.tsx 33.13% <0.00%> (-1.41%) ⬇️
packages/pro/textarea/src/types.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sallerli1 sallerli1 self-requested a review March 29, 2023 08:18
packages/pro/textarea/src/ProTextarea.tsx Outdated Show resolved Hide resolved
packages/pro/textarea/src/ProTextarea.tsx Outdated Show resolved Hide resolved
packages/pro/textarea/src/composables/useRowsCounts.ts Outdated Show resolved Hide resolved
packages/pro/textarea/style/index.less Outdated Show resolved Hide resolved
res.push(...new Array(rows - res.length).fill(1))
}

setRowCounts(res)
}

watch(valueRef, calcRowCounts)
Copy link

Choose a reason for hiding this comment

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

the code review

  1. The code could be improved by changing the line "const lines = valueRef.value?.split('\n') ?? []" to a more explicit condition like "if (valueRef.value) { const lines = valueRef.value.split('\n'); } else { const lines = []; }".

  2. The code could be improved by adding an additional condition to check for the existence of the "rows" parameter before proceeding with the rest of the logic.

  3. The code should also be checked for any potential bugs, such as typos, logical errors, etc.

  4. The code should also be checked for any potential security risks, such as SQL Injection attacks, XSS attacks, etc.

  5. The code should also be tested for performance and scalability issues.

@kovsu kovsu requested a review from sallerli1 March 29, 2023 10:47
@sallerli1 sallerli1 merged commit c6727d9 into IDuxFE:main Apr 13, 2024
5 of 7 checks passed
sallerli1 pushed a commit that referenced this pull request Apr 17, 2024
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.

None yet

2 participants