Skip to content

Commit

Permalink
fix(dashboard): quand on renomme un champ dans une liste de champs tr…
Browse files Browse the repository at this point in the history
…ès longue, ça jump et c'est frustrant - c'est fixé
  • Loading branch information
Arnaud AMBROSELLI committed Nov 6, 2023
1 parent 11e1ad4 commit ed76013
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion dashboard/src/components/SelectDraggableAndEditable.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@ const SelectDraggableAndEditable = ({ onChange, classNamePrefix, value, onEditCh
aria-label={`Modifier le choix ${props.children}`}
title={`Modifier le choix ${props.children}`}
className={`tw-ml-2 ${classNamePrefix}__multi-value__edit tw-rounded-sm tw-px-1 hover:tw-bg-[#FFBDAD] hover:tw-text-[#DE350B]`}
onClick={() => setEditingChoice(props.children)}
onMouseDown={(e) => {
// Prevent propagation to parent components
e.stopPropagation();
// Explicitly blur the Select input
document.querySelector(`.${classNamePrefix}__input`).blur();
}}
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
setEditingChoice(props.children);
}}
type="button">
✎
</button>
Expand Down

0 comments on commit ed76013

Please sign in to comment.