Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Searchable dropdowns on document details component #154

Merged
merged 4 commits into from
Dec 18, 2020
Merged

Searchable dropdowns on document details component #154

merged 4 commits into from
Dec 18, 2020

Conversation

shamoon
Copy link
Contributor

@shamoon shamoon commented Dec 18, 2020

This closes #152 and includes searchable dropdowns for correspondents / document types / tags with ng-select. The integration is customized to match paperless-ng including using tag components with custom colors, etc.

@shamoon shamoon mentioned this pull request Dec 18, 2020
@jonaswinkler
Copy link
Owner

Awesome. I don't have to do anything.

@jonaswinkler jonaswinkler merged commit b262ec4 into jonaswinkler:dev Dec 18, 2020
this.displayValue.splice(index, 1)
let oldValue = this.displayValue
oldValue.splice(index, 1)
this.displayValue = [...oldValue]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this overly complicated? .splice() works in place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea because of the change detection you can’t just splice the array you need to set a new one, see https://github.com/ng-select/ng-select#change-detection

@jonaswinkler
Copy link
Owner

jonaswinkler commented Dec 18, 2020

Btw, I've played a bit with the styling and tried to set the border coloring when focused to $primary. It's blue right now. I've included the .scss version of the default style instead and was able to set $ng-select-highlight and such. However, I couldn't quite figure out where the style of the other input fields is defined.

@shamoon
Copy link
Contributor Author

shamoon commented Dec 18, 2020

Yea I styled them to fit with bootstrap. Code is in the global styles sheet (I put a comment in the input-select but not the tags. See https://github.com/ng-select/ng-select#custom-styles

tribut pushed a commit to tribut/paperless-ng that referenced this pull request Aug 18, 2022
* New translations messages.xlf (Luxembourgish)
[ci skip]

* New translations messages.xlf (French)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (Portuguese)
[ci skip]

* New translations messages.xlf (Luxembourgish)
[ci skip]

* New translations messages.xlf (Portuguese, Brazilian)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (German)
[ci skip]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants