How do I delete my selected point dynamically from other points in a mapview using holoviews Datalink

I am trying to create a dynamic widget that links a data frame and a map using Datalinks. The user can select points from either the map view or from the data frame interactively. It was all straightforward until I wanted to create a logic that will remove/delete the selected points from my dataset and update the map with what was left using a button click. Using, I was able to get the data frame index, but I cannot retrieve that outside the callback function. Please guys, I really need help here, I am out of ideas. I am looking for a way to get the updated data frame after removing selected points from the map view or table. I hope this is possible

Here is a sample of my code;

import geopandas as gpd
import panel as pn
import pandas as pd
import numpy as np
import holoviews as hv
import geoviews as gv
import as ccrs
from holoviews.plotting.links import DataLink
from geoviews import opts, tile_sources as gvts

miny = 18.910360999999998
maxx = 179.77847
maxy = 71.365162

# set sample size
n = 100
# generate random data within the bounds
x = np.random.uniform(minx, maxx, n)
y = np.random.uniform(miny, maxy, n)

# convert them to a points GeoSeries
gdf_points = gpd.GeoSeries(gpd.points_from_xy(x, y))

# convert to geoframe and assign date to rows


data = gpd.GeoDataFrame(pd.DataFrame (gdf_points, columns=['geometry']), crs='epsg:4326', geometry=gdf_points.geometry)
data["random_day"] = np.random.choice(day_list, size=len(data))

class MyWidget():
    idx = None
    def __init__(self,data, **params):
        super().__init__(**params) = data
    def Main(self):
        button = pn.widgets.Button(name='Delete', button_type='primary')
        def Show():
            tabs =hv.Table('geometry')).opts(width=400,selectable='checkbox')
            table_map = gv.Points(list(, crs=ccrs.PlateCarree())
            DataLink(table_map, tabs)
            idx = hv.streams.Selection1D(source= table_map)
            overlay = (gvts.EsriImagery*table_map).opts(
                            opts.Points(width=500, height=550, tools=['hover', 'tap', 'box_select','lasso_select'], toolbar='right',xaxis=None,
            return pn.Column(table_map +tabs,idx)
        def getidx():
            if idx != None:
                return idx
        def view():
            return pn.Row(button,Show(),getidx)
        return view()

As shown below, I can capture the index of the selected data frame only inside the call-back function. appending the streaming event to a list did not work for me either