Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#77] Fix: wrong active category #72

Closed
wants to merge 446 commits into from

Conversation

serebrov
Copy link

[#77] Fix: wrong active category (the next category is highlighted as active, not the current one).

Because, when used in slot, we can't resend the event to picker component.
Example:

    render(h) {
        return (
            <div class="emoji-mart-holder">
              <div class="emoji-mart-body">
                </div>
                {
                <Picker
                    scopedSlots={{
                        previewIdleTemplate: slotProps => {
                            return [
                            <div>
                              <div class="emoji-mart-preview-skins">
                                // Here we do this.$emit('change', $event), but the Picker component
                                // will not get that, as we are in the external slot
                                <Skins skin={ slotProps.skinProps.skin }
                                       onChange={ $event => this.$emit('change', $event) } />

                                // Here we call the callback directly:
                                <Skins skin={ slotProps.skinProps.skin }
                                       onChange={ $event => slotProps.onSkinChange($event) } />
                              </div>
                          </div>
                          ]
                        }
                    }}
                    onSelect={this.selectEmoji}
                    title="Pick your emoji..."
                    emoji="point_up" set="emojione"
                    perLine={this.perLine}
                />
                }
              </div>
            </div>
        );

// And we can do the same in the default content of the Preview component,
// call the onSkinChange directly instead of passing the 'change' event:

-        <skins :skin="skinProps.skin" @change="$emit('change', $event)" />
+        <skins :skin="skinProps.skin" @change="onSkinChange($event)" />
Started with the granular slots (inside the Search / Preview
components), but it appears that fallback content is not rendered
in the nested slots in vue 2.5.
It works in 2.6 and should be further improved in 3.0,
see vuejs/vue#7765 (comment)
Update build scripts, update json data.
Removed: emojione (JoyPixels request) and messenger (unified into facebook) sets.
Replaced 'Smileys & People' category with 'Smileys & Emotions' and 'People & Body'.
[#68] Fix visible edges of nearby sprite icons
I am not sure about the fix as it depends on virtual scroller inernals.
It looks like before, the `endIndex-1` expression worked well while
now it is `endIndex-2`, although I din't really know if that is
always the case.
@serebrov serebrov closed this Jul 25, 2020
@serebrov
Copy link
Author

Wrong base.

@serebrov serebrov deleted the 77-wrong-active-category branch July 25, 2020 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant