Workaround for Clearing Tag Vector of empty elements
This commit is contained in:
parent
9807b378cb
commit
a67d9ae25d
1 changed files with 2 additions and 1 deletions
|
@ -285,11 +285,12 @@ impl eframe::App for Generator<'_> {
|
|||
|
||||
ui.horizontal(|row| {
|
||||
row.label("Tags:");
|
||||
&mut self.metadata[0].tags.retain(|x| x != "");
|
||||
for mut tag in &mut self.metadata[0].tags {
|
||||
text_input(row, &mut tag, "", false);
|
||||
}
|
||||
if row.button("+").clicked() {
|
||||
&self.metadata[0].tags.push("".to_string());
|
||||
&self.metadata[0].tags.push(" ".to_string());
|
||||
};
|
||||
});
|
||||
|
||||
|
|
Reference in a new issue