Closed moinakmalkhan closed 1 year ago
@moinakmalkhan on key up seems okay but will it be possible for you to manage using overriding styles w/ css like target built in class rti--tag
etc.
@harshzalavadiya Yeh, you are right but what if the user wanna add a pre-existing CSS class to tags or input such as form-control
?
@moinakmalkhan
makes sense is it possible to have common property that we can use for both for example...
classNames={{tag: "clsnm-tag", input: "clasnm-input"}}
Then in components we can use
<Tag key={tag} className={classNames?.tag} {...rest} />
<input className={cc("rti--input", RTIInput, classNames?.input)} />
also https://github.com/hc-oss/react-tag-input-component/blob/master/src/classnames.tsx#L9 can be modified to look like below to handle empty conditions
return obj.filter(c => c).join(" ");
also in docs onChange
is copied twice can we rename one to classNames
@harshzalavadiya Sure.
@harshzalavadiya I pushed the new changes. Please tested it out before merging it
@moinakmalkhan LGTM, i'll do small cleanup and then merge this with master
Please test it out before merging it. I need these changes for adding some style to input and tags and also need the onKeyUp event to do some logic related to project