const renderDropdowns = () => { return attributes.map((attribute, index) => { const…
- User
const renderDropdowns = () => { return attributes.map((attribute, index) => { const isVisible = index === 0 || (selectedValues[attributes[index - 1]] !== null && selectedValues[attributes[index - 1]] !== "");
if (attribute === "kw_ps") { return ( isVisible && options["kw_ps"] && ( <div key="kw_ps"> <select value={selectedValues["kw_ps"] || ""} onChange={(e) => handleChange("kw_ps", e.target.value)} > <option value="">Select kw/ps</option> {options["kw_ps"].map((option, optionIndex) => ( <option key={optionIndex} value={option}> {option} </option> ))} </select> </div> ) ); } return ( isVisible && ( <div key={attribute}> {options[attribute] && attribute !== "preis" && ( <select value={selectedValues[attribute] || ""} onChange={(e) => handleChange(attribute, e.target.value)} > <option value="">Select {attribute}</option> {options[attribute].map((option, optionIndex) => ( <option key={optionIndex} value={option}> {option} </option> ))} </select> )} {options[attribute] && attribute === "preis" && ( <input className="e-input" type="text" name="Preis" value={(options[attribute].length === 1 && (options[attribute][0])) || "No Price set"} readOnly /> )} </div> ) ); }); };Make the dropdowns all equal in size
- Assistant
- User
im using react
- Assistant
- User
Where should i keep the css file in the project structure
- Assistant
The placement of CSS files in a React project can vary based on preferences and the overall project structure. However, here are some common practices to help organize your styles effectively: