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

Bug: BqSelect does not render/display the initial value defined #1016

Closed
ghita-daian opened this issue Apr 18, 2024 · 0 comments · Fixed by #1017
Closed

Bug: BqSelect does not render/display the initial value defined #1016

ghita-daian opened this issue Apr 18, 2024 · 0 comments · Fixed by #1017
Labels
bug 🐛 Something isn't working

Comments

@ghita-daian
Copy link

ghita-daian commented Apr 18, 2024

BEEQ package

beeq/react

BEEQ version

1.2.0

Current Behavior

BqSelect: initial value is not displayed in the input, although the corresponding option is marked as active (as expected).

Expected Behavior

BqSelect: the initial value should be displayed when the component loads.

Steps to Reproduce

function App() {
  const [selectedVale, setSelectedValue] = useState("Active");

  const handleSelect = (
    ev: CustomEvent<{ value: string | number | string[] }>
  ) => setSelectedValue(String(ev.detail.value));

  return (
    <div className="container">
      <p>Selected value: {selectedVale}</p>
      <br />
      <BqSelect
        name="select"
        disableClear={true}
        placeholder="Select a value"
        value={selectedVale}
        onBqSelect={handleSelect}
      >
        <BqOption value="Active">Active</BqOption>
        <BqOption value="Arhived">Arhived</BqOption>
      </BqSelect>
    </div>
  );
}

Code Reproduction URL

CodeSanbox example

Your Environment

No response

Additional Information

No response

@ghita-daian ghita-daian added the bug 🐛 Something isn't working label Apr 18, 2024
@dgonzalezr dgonzalezr changed the title Bug: [bq-select] the initial value is not render on react javascript Bug: BqSelect does not render/display the initial value defined Apr 18, 2024
@dgonzalezr dgonzalezr moved this to In progress 🛠️ in BEEQ Design System Apr 18, 2024
@dgonzalezr dgonzalezr moved this from In progress 🛠️ to Review 🔍 in BEEQ Design System Apr 18, 2024
@github-project-automation github-project-automation bot moved this from Review 🔍 to Done 🎉 in BEEQ Design System Apr 18, 2024
@dgonzalezr dgonzalezr moved this from Done 🎉 to Released 🚀 in BEEQ Design System May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Status: Released 🚀
Development

Successfully merging a pull request may close this issue.

1 participant