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

The generation location is incorrect #237

Open
beilo opened this issue May 22, 2024 · 1 comment
Open

The generation location is incorrect #237

beilo opened this issue May 22, 2024 · 1 comment
Labels
bug Something isn't working medium-priority Medium priority issue

Comments

@beilo
Copy link

beilo commented May 22, 2024

I found that the generation position is incorrect during use. For details, please refer to the comments in the code below. Thank you for taking the time to solve this problem. Thank you~

          console.debug("lp ~ file: index.tsx:1 ~ SearchInput ~ _:", _)  // This is wrong.
import { Close, Search as SearchIcon } from '@react-vant/icons'
import clx from 'classnames/bind'
import { useState } from 'react'
import { Search } from 'react-vant'
import css from './index.module.scss'
const cxBind = clx.bind(css)

const SearchInput = (props: any) => {
  // value state
  const [value, setValue] = useState('')
  console.debug('lp ~ file: index.tsx:19 ~ SearchInput ~ value:', value)

  const _search = () => {
    props.onSearch(value)
  }
  return (
    <div className={cxBind('box')}>
      <Search
        background="#f2f3f5"
        className={cxBind('search')}
        value={value}
        onChange={(_)=>{
          _ // Here, if using control+option+L, it will be generated at the top of the file.
        }}
        clearable
        onClear={() => {
          setValue('')
        }}
        onSearch={_search}
        leftIcon={null}
        clearIcon={<Close />}
        rightIcon={<SearchIcon onClick={_search} />}
      />
    </div>
  )
}

export default SearchInput
@Chakroun-Anas Chakroun-Anas added bug Something isn't working medium-priority Medium priority issue labels Jan 20, 2025
@Chakroun-Anas
Copy link
Owner

Hi @beilo, thank you for reporting this issue and sharing a detailed example!

I’ve tested this scenario with the latest version of Turbo Console Log (v2.10.8), and it appears that the issue has been resolved. The generation location now works as expected.

Could you please update your extension to the latest version and verify if the problem persists? If it does, feel free to provide additional details, and I’ll be happy to investigate further.

Thanks again for taking the time to help improve Turbo Console Log and sorry for the very late response! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working medium-priority Medium priority issue
Projects
None yet
Development

No branches or pull requests

2 participants