From 7ea1696065e16a2e174a3edfafdcb2ea8f4cc62b Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Thu, 19 Sep 2024 10:40:09 -0500 Subject: [PATCH] Adjust html structure to handle tags as list Begin work on setting a better html structure for the component. Create a .less file for the component, which I may not actually use. --- client/homebrew/editor/tagInput/tagInput.jsx | 11 +++++++---- client/homebrew/editor/tagInput/tagInput.less | 0 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 client/homebrew/editor/tagInput/tagInput.less diff --git a/client/homebrew/editor/tagInput/tagInput.jsx b/client/homebrew/editor/tagInput/tagInput.jsx index 625e89c36..8619df6cf 100644 --- a/client/homebrew/editor/tagInput/tagInput.jsx +++ b/client/homebrew/editor/tagInput/tagInput.jsx @@ -1,3 +1,4 @@ +require('./tagInput.less'); const React = require('react'); const { useState, useEffect } = React; const _ = require('lodash'); @@ -56,13 +57,13 @@ const TagInput = ({ unique = true, values = [], ...props }) => { const renderReadTag = (context, index) => { return ( -
editTag(context.value)}> {context.value} -
+ ); }; @@ -80,8 +81,10 @@ const TagInput = ({ unique = true, values = [], ...props }) => { return (
-
- {valueContext.map((context, index) => { return context.editing ? renderWriteTag(context, index) : renderReadTag(context, index); })} +
+
    + {valueContext.map((context, index) => { return context.editing ? renderWriteTag(context, index) : renderReadTag(context, index); })} +